[systemd-commits] src/import

Thomas H.P. Andersen phomes at kemper.freedesktop.org
Tue May 19 10:25:05 PDT 2015


 src/import/pull-dkr.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 6d9bad91d7219b6c9bba7e6536992338f464f796
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Tue May 19 19:23:53 2015 +0200

    pull-dkr: fix memleak

diff --git a/src/import/pull-dkr.c b/src/import/pull-dkr.c
index 38c8db9..dd2097b 100644
--- a/src/import/pull-dkr.c
+++ b/src/import/pull-dkr.c
@@ -1246,7 +1246,7 @@ finish:
 
 static int get_protocol_address(char **protocol, char **address, const char *url) {
         const char *sep, *dot;
-        char *a, *p;
+        _cleanup_free_ char *a = NULL, *p = NULL;
 
         sep = strstr(url, "://");
         if (!sep)
@@ -1270,6 +1270,7 @@ static int get_protocol_address(char **protocol, char **address, const char *url
 
         *address = a;
         *protocol = p;
+        a = p = NULL;
 
         return 0;
 }



More information about the systemd-commits mailing list