projects
/
project
/
libubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
switch from typeof to the more portable __typeof__
[project/libubox.git]
/
utils.c
diff --git
a/utils.c
b/utils.c
index
765dd8b
..
c22250d
100644
(file)
--- a/
utils.c
+++ b/
utils.c
@@
-47,8
+47,11
@@
void *__calloc_a(size_t len, ...)
va_end(ap1);
ptr = calloc(1, alloc_len);
- if (!ptr)
+ if (!ptr) {
+ va_end(ap);
return NULL;
+ }
+
alloc_len = 0;
foreach_arg(ap, cur_addr, cur_len, &ret, len) {
*cur_addr = &ptr[alloc_len];