summaryrefslogtreecommitdiff
path: root/src/import
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-05-19 19:23:53 +0200
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-05-19 19:24:47 +0200
commit6d9bad91d7219b6c9bba7e6536992338f464f796 (patch)
tree717d0c523e6b3c6789e8a2c1a530846f8fde46fd /src/import
parent2c4fb0eab8fd05d6375fa3b78b5e2ee5eb93bf09 (diff)
pull-dkr: fix memleak
Diffstat (limited to 'src/import')
-rw-r--r--src/import/pull-dkr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/import/pull-dkr.c b/src/import/pull-dkr.c
index 38c8db9eb2..dd2097bb1d 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;
}