mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 23:51:33 +00:00
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>
This commit is contained in:
parent
2d5e86b110
commit
36d35345b1
1 changed files with 4 additions and 1 deletions
|
@ -95,8 +95,10 @@ int pack_byte_string(uint8_t *str, size_t size, const char *format, ...)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (offset + length > size)
|
if (offset + length > size) {
|
||||||
|
va_end(args);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
switch (*format) {
|
switch (*format) {
|
||||||
case 'b':
|
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);
|
length = va_arg(args, uint32_t);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
va_end(args);
|
||||||
debug("Couldn't recognize format string\n");
|
debug("Couldn't recognize format string\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue