From 6d9bad91d7219b6c9bba7e6536992338f464f796 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Tue, 19 May 2015 19:23:53 +0200 Subject: [PATCH] pull-dkr: fix memleak --- src/import/pull-dkr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/import/pull-dkr.c b/src/import/pull-dkr.c index 38c8db9eb2c..dd2097bb1d3 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; }