summaryrefslogtreecommitdiff
path: root/src/irmd/reg/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irmd/reg/proc.c')
-rw-r--r--src/irmd/reg/proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/irmd/reg/proc.c b/src/irmd/reg/proc.c
index 8a7e24c9..94ac6b8f 100644
--- a/src/irmd/reg/proc.c
+++ b/src/irmd/reg/proc.c
@@ -119,6 +119,7 @@ static struct name_entry * __reg_proc_get_name(const struct reg_proc * proc,
llist_for_each(p, &proc->names) {
struct name_entry * entry;
entry = list_entry(p, struct name_entry, next);
+ assert(entry->name != NULL);
if (strcmp(entry->name, name) == 0)
return entry;
}
@@ -140,7 +141,7 @@ int reg_proc_add_name(struct reg_proc * proc,
}
entry->name = strdup(name);
- if (entry == NULL) {
+ if (entry->name == NULL) {
log_err("Failed to strdup name.");
goto fail_name;
}