From aae88aa2530ba177053fae9f0abd4b73893bbaff Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 5 Oct 2014 07:27:13 +0200 Subject: [PATCH] lib/verifysig.c: resource leak (CID 62727) --- lib/verifysig.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/verifysig.c b/lib/verifysig.c index 313b8b06..18699925 100644 --- a/lib/verifysig.c +++ b/lib/verifysig.c @@ -82,7 +82,7 @@ xbps_verify_file_signature(struct xbps_repo *repo, const char *fname) { xbps_dictionary_t repokeyd = NULL; xbps_data_t pubkey; - const char *hexfp = NULL; + char *hexfp = NULL; unsigned char *buf = NULL, *sig_buf = NULL; size_t buflen, filelen, sigbuflen, sigfilelen; char *rkeyfile = NULL, *sig = NULL; @@ -132,6 +132,8 @@ xbps_verify_file_signature(struct xbps_repo *repo, const char *fname) val = true; out: + if (hexfp) + free(hexfp); if (rkeyfile) free(rkeyfile); if (buf)