summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-11-21 22:50:18 (GMT)
committerJustus Winter <4winter@informatik.uni-hamburg.de>2013-11-21 22:50:18 (GMT)
commit6c0c037b5f79a2dfe3b1d6ebc108ba461c6b4d46 (patch)
tree8d7d2954040d9f0dab6fee51e92a771ace8044ec
parent9655ce06eb45355ada409f9ffe6105c40d668719 (diff)
unionfs: fix memory leak in patternlist_addHEADmaster
Found using the Clang Static Analyzer. * pattern.c (patternlist_add): Fix memory leak.
-rw-r--r--pattern.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pattern.c b/pattern.c
index 409ed23..fd38cf5 100644
--- a/pattern.c
+++ b/pattern.c
@@ -52,7 +52,10 @@ patternlist_add (struct patternlist *list, char *pattern)
err = ENOMEM;
if (err)
+ {
+ free (dup);
return err;
+ }
listentry->pattern = dup;