From e90ed618e823209660b9179e865a79f724592b1b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 26 Jul 2015 08:18:49 +0200 Subject: [PATCH] xbps-install/transaction: minor resource leak (CID #98690). --- bin/xbps-install/transaction.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/xbps-install/transaction.c b/bin/xbps-install/transaction.c index 536538fa..70aecdf3 100644 --- a/bin/xbps-install/transaction.c +++ b/bin/xbps-install/transaction.c @@ -322,14 +322,16 @@ exec_transaction(struct xbps_handle *xhp, int maxcols, bool yes, bool drun) if (xbps_humanize_number(instsize, (int64_t)isize) == -1) { xbps_error_printf("humanize_number2 returns " "%s\n", strerror(errno)); - return -1; + rv = -1; + goto out; } xbps_dictionary_get_uint64(xhp->transd, "disk-free-size", &fsize); if (xbps_humanize_number(freesize, (int64_t)fsize) == -1) { xbps_error_printf("humanize_number2 returns " "%s\n", strerror(errno)); - return -1; + rv = -1; + goto out; } fprintf(stderr, "Transaction aborted due to insufficient disk " "space (need %s, got %s free).\n", instsize, freesize);