diff options
author | Jiri Popelka <jpopelka@redhat.com> | 2011-06-10 15:26:02 +0200 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2011-06-22 18:08:30 +0200 |
commit | f53710b16c2bae1843c3f5fee390f496dfa82526 (patch) | |
tree | 49bd078b7e27e6c3d144773b2c140ce013947172 | |
parent | d0101690d9ae347d8a8ee9e340c5db72480046a3 (diff) |
iptables: Coverity: RESOURCE_LEAK
xtables.c:320: alloc_fn: Calling allocation function "get_modprobe".
xtables.c:294: alloc_fn: Storage is returned from allocation function "malloc".
xtables.c:294: var_assign: Assigning: "ret" = "malloc(1024UL)".
xtables.c:304: return_alloc: Returning allocated memory "ret".
xtables.c:320: var_assign: Assigning: "buf" = storage returned from "get_modprobe()".
xtables.c:323: var_assign: Assigning: "modprobe" = "buf".
xtables.c:348: leaked_storage: Variable "buf" going out of scope
leaks the storage it points to.
xtables.c:348: leaked_storage: Returning without freeing "modprobe"
leaks the storage that it points to.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
-rw-r--r-- | iptables/xtables.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/iptables/xtables.c b/iptables/xtables.c index db6d079f..00c7c066 100644 --- a/iptables/xtables.c +++ b/iptables/xtables.c @@ -362,6 +362,7 @@ int xtables_insmod(const char *modname, const char *modprobe, bool quiet) /* not usually reached */ exit(1); case -1: + free(buf); return -1; default: /* parent */ |