1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

ldb: Call TALLOC_FREE(filtered_msg->elements) on ldb_filter_attrs() failure

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 27 01:16:33 UTC 2019 on sn-devel-184
This commit is contained in:
Andrew Bartlett 2019-08-26 14:50:15 +12:00
parent 2117789c35
commit 1521a22f43
2 changed files with 3 additions and 0 deletions

View File

@ -1256,5 +1256,6 @@ int ldb_filter_attrs(struct ldb_context *ldb,
return 0;
failed:
TALLOC_FREE(filtered_msg->elements);
return -1;
}

View File

@ -384,6 +384,7 @@ static void test_filter_attrs_two_dup_attr_matched_one_attr(void **state)
/* This should fail the pidgenhole test */
assert_int_equal(ret, -1);
assert_null(filtered_msg->elements);
}
/*
@ -772,6 +773,7 @@ static void test_filter_attrs_one_attr_matched_star_no_dn(void **state)
attrs,
filtered_msg);
assert_int_equal(ret, -1);
assert_null(filtered_msg->elements);
}
/*