From aa8d88272ef6cd8a1a6e6fdd9e2970f46bfac238 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 5 Oct 2014 07:32:43 +0200 Subject: [PATCH] lib/repo.c: resource leak (CID 62715) --- lib/repo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/repo.c b/lib/repo.c index 1d22414e..930b2d3e 100644 --- a/lib/repo.c +++ b/lib/repo.c @@ -449,7 +449,7 @@ xbps_repo_key_import(struct xbps_repo *repo) xbps_dictionary_t repokeyd = NULL; xbps_data_t pubkey = NULL; uint16_t pubkey_size = 0; - const char *hexfp = NULL, *signedby = NULL; + char *hexfp = NULL, *signedby = NULL; char *p, *dbkeyd, *rkeyfile = NULL; int import, rv = 0; @@ -534,6 +534,8 @@ xbps_repo_key_import(struct xbps_repo *repo) } out: + if (hexfp) + free(hexfp); if (repokeyd) xbps_object_release(repokeyd); if (rkeyfile)