idmap: Use TALLOC_FREE instead of explicit code
authorVolker Lendecke <vl@samba.org>
Fri, 6 Apr 2018 09:02:48 +0000 (11:02 +0200)
committerJeremy Allison <jra@samba.org>
Sat, 7 Apr 2018 00:11:20 +0000 (02:11 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/idmap_ad_nss.c

index d65e1e9de8d0dc83ba7cbb8fffd65448dd6141e2..8e960b8a21e6934b0f58eb04e3289ec606787e2d 100644 (file)
@@ -353,9 +353,7 @@ static NTSTATUS nss_ad_map_from_alias( TALLOC_CTX *mem_ctx,
        nt_status = NT_STATUS_OK;
 
 done:
-       if (filter) {
-               talloc_destroy(filter);
-       }
+       TALLOC_FREE(filter);
        if (msg) {
                ads_msgfree(ctx->ads, msg);
        }