Free protect_ids in secret_store_domain_guid() as the caller of fetch_secrets() must...
authorMichele Baldessari <michele@acksyn.org>
Fri, 7 Sep 2012 00:32:11 +0000 (17:32 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 7 Sep 2012 02:11:43 +0000 (04:11 +0200)
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep  7 04:11:43 CEST 2012 on sn-devel-104

source3/passdb/machine_account_secrets.c

index 70d7106176f4950a0dfa2982152745f5199d3219..6320f4e2f7cc635b95bc19d3a90787404598b63b 100644 (file)
@@ -149,9 +149,11 @@ bool secrets_store_domain_guid(const char *domain, struct GUID *guid)
                if (strncmp(protect_ids, "TRUE", 4)) {
                        DEBUG(0, ("Refusing to store a Domain SID, "
                                  "it has been marked as protected!\n"));
+                       SAFE_FREE(protect_ids);
                        return false;
                }
        }
+       SAFE_FREE(protect_ids);
 #endif
 
        slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_GUID, domain);