diff options
author | André Draszik <adraszik@tycoint.com> | 2017-10-03 18:55:54 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-11-17 17:15:52 +0300 |
commit | 9d0c5fee29c30a361309514459e88e401f292532 (patch) | |
tree | f489ec84080a114b9f6cf7e72c9ca256303e2fc4 | |
parent | 1259f778c9b419f02e2c155996b2d15ff262901e (diff) | |
download | u-boot-9d0c5fee29c30a361309514459e88e401f292532.tar.xz |
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 <adraszik@tycoint.com>
Acked-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | lib/tpm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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': |