ldb: use TALLOC_FREE() over talloc_free() in ldb_filter_attrs()
authorAndrew Bartlett <abartlet@samba.org>
Mon, 26 Aug 2019 02:48:52 +0000 (14:48 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 26 Aug 2019 23:59:36 +0000 (23:59 +0000)
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 <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
lib/ldb/common/ldb_pack.c

index 1d67622b69e3fbc3dbbaee3ea95e5f536359e385..b5e1fbbc4ffc87c805446a4a209c2645ae035ba8 100644 (file)
@@ -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;