projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d5e86b
)
tpm: add missing va_end
author
xypron.glpk@gmx.de
<xypron.glpk@gmx.de>
Sun, 30 Jul 2017 19:40:37 +0000
(21:40 +0200)
committer
Tom Rini
<trini@konsulko.com>
Sun, 13 Aug 2017 19:17:29 +0000
(15:17 -0400)
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>
lib/tpm.c
patch
|
blob
|
history
diff --git
a/lib/tpm.c
b/lib/tpm.c
index
fb520e3
..
d1cf5a8
100644
(file)
--- a/
lib/tpm.c
+++ b/
lib/tpm.c
@@
-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;
}