Clear num_opts early
authorJens Axboe <jens.axboe@oracle.com>
Wed, 11 Jun 2008 09:47:56 +0000 (11:47 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 11 Jun 2008 09:47:56 +0000 (11:47 +0200)
If we error out, it could be garbage.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
init.c

diff --git a/init.c b/init.c
index 9169977..652b2e2 100644 (file)
--- a/init.c
+++ b/init.c
@@ -637,6 +637,7 @@ static int parse_jobs_ini(char *file, int stonewall_flag)
 
        alloc_opts = 8;
        opts = malloc(sizeof(char *) * alloc_opts);
+       num_opts = 0;
 
        stonewall = stonewall_flag;
        do {