diff options
author | xypron.glpk@gmx.de <xypron.glpk@gmx.de> | 2017-07-30 19:40:37 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-13 19:17:29 (GMT) |
commit | 36d35345b1f6124d7e1763c818ec29e1709f9eec (patch) | |
tree | 7310eb198cfa77c87542a26cdc120d199ba0347b /lib/tpm.c | |
parent | 2d5e86b110e7287beba0627c41dab795e8d17aea (diff) | |
download | u-boot-fsl-qoriq-36d35345b1f6124d7e1763c818ec29e1709f9eec.tar.xz |
tpm: add missing va_end
va_start must always be matched by va_end.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/tpm.c')
-rw-r--r-- | lib/tpm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -95,8 +95,10 @@ int pack_byte_string(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': @@ -163,6 +165,7 @@ int unpack_byte_string(const uint8_t *str, size_t size, const char *format, ...) length = va_arg(args, uint32_t); break; default: + va_end(args); debug("Couldn't recognize format string\n"); return -1; } |