diff options
author | Dimitri Staessens <[email protected]> | 2022-02-25 00:15:29 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2022-03-03 12:00:53 +0100 |
commit | 3330f7f22105e3a8b57f5c562144d8c3e338e156 (patch) | |
tree | e71198513cbc3f3d0f4d0d7370a3d4ed62114a94 /src/irmd/prog_table.c | |
parent | 27374c05645cb6a656e82a9a0b6bc810082cfe4e (diff) | |
download | ouroboros-3330f7f22105e3a8b57f5c562144d8c3e338e156.tar.gz ouroboros-3330f7f22105e3a8b57f5c562144d8c3e338e156.zip |
irmd: Fix memory leak of ret_msg
The ret_msg variable can leak in the main loop of the irmd in this
failure path.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/irmd/prog_table.c')
-rw-r--r-- | src/irmd/prog_table.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/irmd/prog_table.c b/src/irmd/prog_table.c index eb2b1966..4b43626c 100644 --- a/src/irmd/prog_table.c +++ b/src/irmd/prog_table.c @@ -110,8 +110,7 @@ void prog_entry_del_name(struct prog_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); } } |