1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

r15980: Correctly destroy talloc_ctx when the LDAP posix attribute query has

failed. Noticed by Bob Gautier.

Guenther
(This used to be commit 7327f94546a90df25c688dcafd42e0993133057a)
This commit is contained in:
Günther Deschner 2006-05-31 10:32:12 +00:00 committed by Gerald (Jerry) Carter
parent b283a205da
commit 2b7b5e9ece

View File

@ -303,13 +303,14 @@ ADS_STATUS ads_check_posix_schema_mapping(ADS_STRUCT *ads, enum wb_posix_mapping
}
}
talloc_destroy(ctx);
ADS_ERROR_HAVE_NO_MEMORY(ads->schema.posix_uidnumber_attr);
ADS_ERROR_HAVE_NO_MEMORY(ads->schema.posix_gidnumber_attr);
ADS_ERROR_HAVE_NO_MEMORY(ads->schema.posix_homedir_attr);
ADS_ERROR_HAVE_NO_MEMORY(ads->schema.posix_shell_attr);
ADS_ERROR_HAVE_NO_MEMORY(ads->schema.posix_gecos_attr);
if (!ads->schema.posix_uidnumber_attr ||
!ads->schema.posix_gidnumber_attr ||
!ads->schema.posix_homedir_attr ||
!ads->schema.posix_shell_attr ||
!ads->schema.posix_gecos_attr) {
status = ADS_ERROR(LDAP_NO_MEMORY);
goto done;
}
status = ADS_ERROR(LDAP_SUCCESS);