提交 9d0c5fee 编写于 作者: A André Draszik 提交者: Simon Glass

tpm: add more missing va_end()

While commit 36d35345 ("tpm: add missing va_end") added
some missing calls to va_end(), it missed a few places.
Signed-off-by: NAndré Draszik <adraszik@tycoint.com>
Acked-by: NSimon Glass <sjg@chromium.org>
上级 1259f778
......@@ -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':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册