diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2018-09-27 11:45:41 +0200 |
---|---|---|
committer | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-09-27 14:03:18 +0200 |
commit | e569fed013e7e01b49b591b192eabdb0431b4976 (patch) | |
tree | 6fd1c92117626a0ce56bf2a244ca1bfc90416a66 /src/irmd/proc_table.c | |
parent | c166a030a1be0e4006605dd12190741986e0f9f2 (diff) | |
download | ouroboros-e569fed013e7e01b49b591b192eabdb0431b4976.tar.gz ouroboros-e569fed013e7e01b49b591b192eabdb0431b4976.zip |
irmd: Add missing unlocks and avoid NULL dereference
There were missing unlocks in certain error conditions and some NULL
pointers were passed to strcmp which is undefined behavior.
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Diffstat (limited to 'src/irmd/proc_table.c')
-rw-r--r-- | src/irmd/proc_table.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/irmd/proc_table.c b/src/irmd/proc_table.c index 115eb2da..6f9d8e20 100644 --- a/src/irmd/proc_table.c +++ b/src/irmd/proc_table.c @@ -172,8 +172,7 @@ void proc_entry_del_name(struct proc_entry * e, struct str_el * s = list_entry(p, struct str_el, next); if (!strcmp(name, s->str)) { list_del(&s->next); - if (s->str != NULL) - free(s->str); + free(s->str); free(s); } } |