From: Kay Sievers Date: Fri, 25 Dec 2009 15:14:22 +0000 (+0100) Subject: udevadm: logging - copy va_list and do not use it twice X-Git-Tag: 174~658 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5a01cb8b31bd0791d1617c56d4c669a02018bd7;p=systemd udevadm: logging - copy va_list and do not use it twice --- diff --git a/udev/udevadm.c b/udev/udevadm.c index 00c2350d..21b7f616 100644 --- a/udev/udevadm.c +++ b/udev/udevadm.c @@ -35,7 +35,11 @@ static void log_fn(struct udev *udev, int priority, fprintf(stderr, "%s: ", fn); vfprintf(stderr, format, args); } else { - vfprintf(stderr, format, args); + va_list args2; + + va_copy(args2, args); + vfprintf(stderr, format, args2); + va_end(args2); vsyslog(priority, format, args); } }