From: Andrew Bartlett Date: Mon, 26 Aug 2019 02:48:52 +0000 (+1200) Subject: ldb: use TALLOC_FREE() over talloc_free() in ldb_filter_attrs() X-Git-Tag: tevent-0.10.1~153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2117789c35fbf6d0ed02f391f17593e11727ec3e;p=thirdparty%2Fsamba.git ldb: use TALLOC_FREE() over talloc_free() in ldb_filter_attrs() This is a macro that sets the pointer to NULL after the talloc_free() and is part of our standard coding practices. Signed-off-by: Andrew Bartlett Reviewed-by: Gary Lockyer --- diff --git a/lib/ldb/common/ldb_pack.c b/lib/ldb/common/ldb_pack.c index 1d67622b69e..b5e1fbbc4ff 100644 --- a/lib/ldb/common/ldb_pack.c +++ b/lib/ldb/common/ldb_pack.c @@ -1251,8 +1251,7 @@ int ldb_filter_attrs(struct ldb_context *ldb, goto failed; } } else { - talloc_free(filtered_msg->elements); - filtered_msg->elements = NULL; + TALLOC_FREE(filtered_msg->elements); } return 0;