]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
CID 1409872: Always call va_end
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 26 May 2017 02:00:45 +0000 (22:00 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 26 May 2017 02:07:52 +0000 (22:07 -0400)
src/lib/util/log.c

index a14f543c50f854195c278a1e0da0e7124255e921..ec4f7574a450717c075e9b852290cbb7da9ba16d 100644 (file)
@@ -443,9 +443,10 @@ int fr_log_perror(fr_log_t const *log, log_type_t type, char const *msg, ...)
 
                va_start(ap, msg);
                tmp = talloc_vasprintf(NULL, msg, ap);
-               if (!tmp) return -1;
                va_end(ap);
 
+               if (!tmp) return -1;
+
                fr_log(log, type, "%s: %s", tmp, strerror);
                talloc_free(tmp);
        } else {