From: Michal Privoznik Date: Tue, 5 Nov 2013 15:37:38 +0000 (+0100) Subject: virpcitest: Fix variable arguments using in pci_driver_new X-Git-Tag: v1.2.0-rc1~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=361f2fa82027e31555617f3eccb409c3bee1fa21;p=thirdparty%2Flibvirt.git virpcitest: Fix variable arguments using in pci_driver_new In the pci_driver_new function it is possible to set a list of IDs that the driver knows. These IDs are passed as variable arguments and are processed the usual way using va_start() and va_arg(). However, after all arguments has been processed, we should call va_end() what we aren't currently doing. Signed-off-by: Michal Privoznik --- diff --git a/tests/virpcimock.c b/tests/virpcimock.c index 2944780478..9385d2ca0a 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -405,6 +405,8 @@ pci_driver_new(const char *name, ...) driver->len++; } + va_end(args); + make_file(driverpath, "bind", NULL); make_file(driverpath, "unbind", NULL); make_file(driverpath, "new_id", NULL);