s3: Fix Coverity ID 2228: RESOURCE_LEAK
authorVolker Lendecke <vl@samba.org>
Sun, 27 Mar 2011 18:44:01 +0000 (20:44 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 27 Mar 2011 20:22:11 +0000 (22:22 +0200)
Holger, please check!

source3/utils/smbta-util.c

index 5b081655e1f43ed05e3450208d60f0a6a1ceee8d..6dfa0d524bea50dfc0ae0ea5da0887a20cc393af 100644 (file)
@@ -154,6 +154,7 @@ static void load_key_from_file_and_activate( char *filename)
        if (akey != NULL) {
                printf("Removing the old key.\n");
                delete_key();
+               SAFE_FREE(akey);
        }
        printf("Installing the key from file %s\n",filename);
        secrets_store("smb_traffic_analyzer_key", key, strlen(key)+1);