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:
parent
2117789c35
commit
1521a22f43
@ -1256,5 +1256,6 @@ int ldb_filter_attrs(struct ldb_context *ldb,
|
||||
|
||||
return 0;
|
||||
failed:
|
||||
TALLOC_FREE(filtered_msg->elements);
|
||||
return -1;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user