mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
dalloc: Fix CID 1097369 API usage errors (VARARGS)
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
784b6a79b8
commit
ea55b1350b
@ -171,6 +171,7 @@ void *dalloc_value_for_key(const DALLOC_CTX *d, ...)
|
||||
array_len = talloc_array_length(d->dd_talloc_array);
|
||||
elem = va_arg(args, int);
|
||||
if (elem >= array_len) {
|
||||
va_end(args);
|
||||
result = -1;
|
||||
goto done;
|
||||
}
|
||||
@ -178,6 +179,8 @@ void *dalloc_value_for_key(const DALLOC_CTX *d, ...)
|
||||
type = va_arg(args, const char *);
|
||||
}
|
||||
|
||||
va_end(args);
|
||||
|
||||
array_len = talloc_array_length(d->dd_talloc_array);
|
||||
|
||||
for (elem = 0; elem + 1 < array_len; elem += 2) {
|
||||
@ -190,7 +193,6 @@ void *dalloc_value_for_key(const DALLOC_CTX *d, ...)
|
||||
break;
|
||||
}
|
||||
}
|
||||
va_end(args);
|
||||
|
||||
done:
|
||||
if (result != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user