diff --git a/libs/libc/misc/lib_err.c b/libs/libc/misc/lib_err.c index 04195ef0b5..9ec3bda6ea 100644 --- a/libs/libc/misc/lib_err.c +++ b/libs/libc/misc/lib_err.c @@ -70,6 +70,10 @@ void vwarn(FAR const char *fmt, va_list ap) #else dprintf(STDERR_FILENO, "%d: %pV: %s\n", getpid(), &vaf, strerror(error)); #endif + +#ifdef va_copy + va_end(copy); +#endif } /****************************************************************************