summaryrefslogtreecommitdiff
path: root/src/collect
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2013-07-10 13:49:26 -0400
committerAnthony G. Basile <blueness@gentoo.org>2013-07-10 15:14:00 -0400
commitb2cf1c7154577f7f8b9f2404c4a41019db314116 (patch)
tree2069d48492c64bfe4ce461b44b088093aef67311 /src/collect
parent5957c143c1b417f040527133daa86c7014822d2c (diff)
Fix potential memleak and use-after-free errors as reported by clang
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/collect')
-rw-r--r--src/collect/collect.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/collect/collect.c b/src/collect/collect.c
index 834e27683c..e938d41728 100644
--- a/src/collect/collect.c
+++ b/src/collect/collect.c
@@ -453,6 +453,7 @@ int main(int argc, char **argv)
him->name = malloc(strlen(argv[i]) + 1);
if (!him->name) {
+ free(him); /* clang reported memleak ; him is thrown away here */
ret = ENOMEM;
goto out;
}