mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-17 12:41:32 +00:00
tpm: add more missing va_end()
While commit 36d35345b1
("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>
This commit is contained in:
parent
1259f778c9
commit
9d0c5fee29
1 changed files with 4 additions and 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':
|
||||
|
|
Loading…
Add table
Reference in a new issue