From: Michael Tremer Date: Thu, 30 Jan 2025 08:39:48 +0000 (+0000) Subject: repo: Fix weird argument handling X-Git-Tag: 0.9.30~285 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb47eb433c04c0c4ee0bd4e15de835605ff31dd2;p=pakfire.git repo: Fix weird argument handling Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/repo.c b/src/pakfire/repo.c index 185bc70e..ccf3e76c 100644 --- a/src/pakfire/repo.c +++ b/src/pakfire/repo.c @@ -238,10 +238,12 @@ static int pakfire_repo_xfer_create( va_list args; int r; - va_start(args, url); - // Create a new transfer + va_start(args, url); r = pakfire_xfer_create(&x, repo->ctx, url, args); + va_end(args); + + // Return on error if (r < 0) goto ERROR; @@ -269,7 +271,6 @@ ERROR: pakfire_mirrorlist_unref(mirrorlist); if (x) pakfire_xfer_unref(x); - va_end(args); return r; }