backupkey: Fix a memleak
authorVolker Lendecke <vl@samba.org>
Wed, 4 Mar 2015 09:33:57 +0000 (10:33 +0100)
committerDavid Disseldorp <ddiss@samba.org>
Wed, 4 Mar 2015 13:46:07 +0000 (14:46 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
source4/rpc_server/backupkey/dcesrv_backupkey.c

index a001c55e45f224e3ac1ba2f37c0e938dc2413dc4..7757533aff4e465e34f70e66b5df8b9b8a06b542 100644 (file)
@@ -221,6 +221,7 @@ static NTSTATUS get_lsa_secret(TALLOC_CTX *mem_ctx,
                return NT_STATUS_INTERNAL_DB_CORRUPTION;
        }
        if (res->count == 0) {
+               talloc_free(tmp_mem);
                return NT_STATUS_RESOURCE_NAME_NOT_FOUND;
        }
        if (res->count > 1) {