lib/tdb/tools/tdbtorture.c: fixed memory leak.
authorSlava Semushin <php-coder@altlinux.ru>
Sat, 6 Jun 2009 17:06:04 +0000 (00:06 +0700)
committerStefan Metzmacher <metze@samba.org>
Wed, 16 Dec 2009 07:03:50 +0000 (08:03 +0100)
Found by cppcheck:
[lib/tdb/tools/tdbtorture.c:326]: (error) Memory leak: pids
(cherry picked from samba commit 497b9e460b5defd60de89b9c5bed890f83ca86a1)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
lib/tdb/tools/tdbtorture.c

index a4a9fed246336437c01aaeace186d46601c6a45a..b0221a2503227a718142738fda6ddbea5916b1a9 100644 (file)
@@ -336,6 +336,8 @@ static void usage(void)
                pids[j] = 0;
        }
 
+       free(pids);
+
        if (error_count == 0) {
                printf("OK\n");
        }