added forgotten free(), forgotten return
authorDima Kogan <dima@secretsauce.net>
Thu, 26 Jun 2014 04:50:15 +0000 (21:50 -0700)
committerChanho Park <chanho61.park@samsung.com>
Fri, 22 Aug 2014 11:38:26 +0000 (20:38 +0900)
library.c

index 562b52a..3754af1 100644 (file)
--- a/library.c
+++ b/library.c
@@ -433,8 +433,10 @@ int library_exported_names_push(struct library_exported_names *names,
                return -1;
 
        result = vect_pushback(aliases, &namedup);
-       if (result != 0)
+       if (result != 0) {
+               free(namedup);
                return result;
+       }
 
        return 0;
 }
@@ -522,6 +524,7 @@ bool library_exported_names_each_alias(
                 .failure = false};
        VECT_EACH(*aliases, const char*, NULL,
                  library_exported_names_each_alias_cb, &context);
+       return true;
 }