From: André Draszik Date: Tue, 3 Oct 2017 15:55:54 +0000 (+0100) Subject: tpm: add more missing va_end() X-Git-Tag: v2018.01-rc1~89^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9d0c5fee29c30a361309514459e88e401f292532;p=u-boot tpm: add more missing va_end() While commit 36d35345b1f6 ("tpm: add missing va_end") added some missing calls to va_end(), it missed a few places. Signed-off-by: André Draszik Acked-by: Simon Glass --- diff --git a/lib/tpm.c b/lib/tpm.c index d21bbcfb11..c8bf06178f 100644 --- a/lib/tpm.c +++ b/lib/tpm.c @@ -92,6 +92,7 @@ int pack_byte_string(uint8_t *str, size_t size, const char *format, ...) break; default: debug("Couldn't recognize format string\n"); + va_end(args); return -1; } @@ -170,8 +171,10 @@ int unpack_byte_string(const uint8_t *str, size_t size, const char *format, ...) return -1; } - if (offset + length > size) + if (offset + length > size) { + va_end(args); return -1; + } switch (*format) { case 'b':