fio: fix job clone mem leak
authorChristian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Wed, 19 Feb 2014 18:42:41 +0000 (10:42 -0800)
committerJens Axboe <axboe@fb.com>
Wed, 19 Feb 2014 18:42:41 +0000 (10:42 -0800)
commit455a50fa14f2663c388abc1138623b9c4405345b
tree8db2b0920216a39355669e3d822c09ffd9c0e6ce
parentdc632d12d74bab6a439aaf8c317d250d3a8def5c
fio: fix job clone mem leak

In the loop to create clones at the bottom of add_job the function
get_new_job clones the thread_data, just to occaisonally get the
allocated pointers for filename and files overwritten a few lines later.

The dup files also duplicates the name strings so the references to
these are lost by the setting to null.

This patch fixes takes care of that and frees the memory before
discarding the pointers (found via valgrind).

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
init.c