mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
s3:libads: Fix memory leaks in ads_create_machine_acct()
Indirect leak of 291 byte(s) in 2 object(s) allocated from: #0 0x7fd77b6dc03f in malloc (/lib64/libasan.so.8+0xdc03f) (BuildId: 3e1694ad218c99a8b1b69231666a27df63cf19d0) #1 0x7fd77b094bc2 in __talloc_with_prefix ../../lib/talloc/talloc.c:783 #2 0x7fd77b096034 in __talloc ../../lib/talloc/talloc.c:825 #3 0x7fd77b096034 in __talloc_strlendup ../../lib/talloc/talloc.c:2454 #4 0x7fd77b096034 in talloc_strdup ../../lib/talloc/talloc.c:2470 #5 0x7fd779996633 in add_string_to_array ../../lib/util/util_strlist.c:504 #6 0x7fd77b10c754 in ads_create_machine_acct ../../source3/libads/ldap.c:2662 #7 0x7fd77b46705f in libnet_join_precreate_machine_acct ../../source3/libnet/libnet_join.c:390 #8 0x7fd77b46705f in libnet_DomainJoin ../../source3/libnet/libnet_join.c:2852 #9 0x7fd77b46705f in libnet_Join ../../source3/libnet/libnet_join.c:3036 #10 0x55fb9788d91a in net_ads_join ../../source3/utils/net_ads.c:1853 #11 0x55fb9793ab86 in net_join ../../source3/utils/net_join.c:45 #12 0x55fb9793084f in net_run_function ../../source3/utils/net_util.c:454 #13 0x55fb97889859 in main ../../source3/utils/net.c:1372 #14 0x7fd7768281af in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
18913d384e
commit
dc18e2a222
@ -2659,7 +2659,7 @@ ADS_STATUS ads_create_machine_acct(ADS_STRUCT *ads,
|
||||
goto done;
|
||||
}
|
||||
|
||||
ok = add_string_to_array(spn_array,
|
||||
ok = add_string_to_array(ctx,
|
||||
spn,
|
||||
&spn_array,
|
||||
&num_spns);
|
||||
@ -2680,7 +2680,7 @@ ADS_STATUS ads_create_machine_acct(ADS_STRUCT *ads,
|
||||
goto done;
|
||||
}
|
||||
|
||||
ok = add_string_to_array(spn_array,
|
||||
ok = add_string_to_array(ctx,
|
||||
spn,
|
||||
&spn_array,
|
||||
&num_spns);
|
||||
|
Loading…
Reference in New Issue
Block a user