mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r764: More memleak fixes in error code path from kawasa_r@itg.hitachi.co.jp.
Jeremy.
(This used to be commit 9647394e7c
)
This commit is contained in:
parent
49f95e6d27
commit
05bc327990
@ -1980,17 +1980,22 @@ ADS_STATUS ads_server_info(ADS_STRUCT *ads)
|
||||
}
|
||||
|
||||
status = ads_do_search(ads, "", LDAP_SCOPE_BASE, "(objectclass=*)", attrs, &res);
|
||||
if (!ADS_ERR_OK(status)) return status;
|
||||
if (!ADS_ERR_OK(status)) {
|
||||
talloc_destroy(ctx);
|
||||
return status;
|
||||
}
|
||||
|
||||
value = ads_pull_string(ads, ctx, res, "ldapServiceName");
|
||||
if (!value) {
|
||||
ads_msgfree(ads, res);
|
||||
talloc_destroy(ctx);
|
||||
return ADS_ERROR(LDAP_NO_RESULTS_RETURNED);
|
||||
}
|
||||
|
||||
timestr = ads_pull_string(ads, ctx, res, "currentTime");
|
||||
if (!timestr) {
|
||||
ads_msgfree(ads, res);
|
||||
talloc_destroy(ctx);
|
||||
return ADS_ERROR(LDAP_NO_RESULTS_RETURNED);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user