1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-26 23:33:15 +03:00

r23036: error checking on asn1_init() failure

This commit is contained in:
Andrew Tridgell
2007-05-21 12:47:18 +00:00
committed by Gerald (Jerry) Carter
parent ea206dce06
commit 26cf849408
8 changed files with 77 additions and 5 deletions

View File

@@ -137,11 +137,13 @@ static NTSTATUS ldapsrv_decode(void *private, DATA_BLOB blob)
struct asn1_data *asn1 = asn1_init(conn);
struct ldap_message *msg = talloc(conn, struct ldap_message);
if (msg == NULL) {
if (asn1 == NULL || msg == NULL) {
return NT_STATUS_NO_MEMORY;
}
if (!asn1_load(asn1, blob)) {
talloc_free(msg);
talloc_free(asn1);
return NT_STATUS_NO_MEMORY;
}