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 91699777e239ee0a04c99f8fdd5fdd52a0a1f5fa..652b2e2775b41dc49dda4553999b19a1cc3f928b 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 {