staging: unisys: uislib: uisutils.c: Fix a missing va_end
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Sat, 27 Dec 2014 22:04:14 +0000 (23:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Jan 2015 01:43:22 +0000 (17:43 -0800)
A missing va_end in connection with vsnprintf

Was found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/uislib/uisutils.c

index d9f527dfb4b81c0f1f28682886f17a6decdcf51c..31318d246252981189ebeea753889313bcc16419 100644 (file)
@@ -56,6 +56,7 @@ uisutil_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining,
        DBGINF("buffer = 0x%p : *buffer = 0x%p.\n", buffer, *buffer);
        va_start(args, format);
        len = vsnprintf(*buffer, *buffer_remaining, format, args);
+       va_end(args);
        if (len >= *buffer_remaining) {
                *buffer += *buffer_remaining;
                *total += *buffer_remaining;