We should not allocate on the NULL context.
=================================================================
==313033==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 376 byte(s) in 1 object(s) allocated from:
#0 0x7ff48b520b4b (/lib64/libasan.so.8+0x120b4b) (BuildId:
388ee9ac193f74c177c6f52988d2d0dab110de41)
#1 0x7ff48bb079d3 in _talloc_realloc ../../lib/talloc/talloc.c:2035
#2 0x7ff48bb0824c in _talloc_realloc_array ../../lib/talloc/talloc.c:2810
#3 0x00000021ab91 in wbinfo_xids_to_sids ../../nsswitch/wbinfo.c:1122
#4 0x00000021ab91 in main ../../nsswitch/wbinfo.c:3065
#5 0x7ff48842b2fa in __libc_start_call_main (/lib64/libc.so.6+0x2b2fa) (BuildId:
8523b213e7586a93ab00f6dd476418b1e521e62c)
#6 0x7ffd3dc6866e ([stack]+0x2066e)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
p = arg;
while (next_token_talloc(frame, &p, &idstr, LIST_SEP)) {
- xids = talloc_realloc(xids,
+ xids = talloc_realloc(frame,
xids,
struct wbcUnixId,
num_xids + 1);