diff options
author | Thomas White <taw@physics.org> | 2010-04-06 14:30:08 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-04-06 14:30:08 +0200 |
commit | 0c59f5b50e601652e7203ac621e18de81b6bfa30 (patch) | |
tree | 68e040ea32c89c1e9d173cf1bdfb48650113975b /src/indexamajig.c | |
parent | 802a981dcb74e5377ff31726b7a23a74fa2cd413 (diff) |
indexamajig: Don't free uninitialised pointers
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r-- | src/indexamajig.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index 00191205..3668adf8 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -538,6 +538,7 @@ int main(int argc, char *argv[]) int r; worker_active[i] = 0; + worker_args[i] = NULL; rval = fgets(line, 1023, fh); if ( rval == NULL ) continue; @@ -651,8 +652,10 @@ int main(int argc, char *argv[]) } free: - free(worker_args[i]->filename); - free(worker_args[i]); + if ( worker_args[i] != NULL ) { + free(worker_args[i]->filename); + free(worker_args[i]); + } } |