Signed-off-by: Jiri Moskovcak jmoskovc@redhat.com --- src/plugins/reporter-rhtsupport.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c index bbf0a1e..4598790 100644 --- a/src/plugins/reporter-rhtsupport.c +++ b/src/plugins/reporter-rhtsupport.c @@ -132,6 +132,9 @@ int create_tarball(const char *tempfile, problem_data_t *problem_data) free(block); }
+ /* now it's safe to free file */ + free_reportfile(file); + /* We must be sure gzip finished, and finished successfully */ int status; safe_waitpid(child, &status, 0); @@ -159,7 +162,6 @@ int create_tarball(const char *tempfile, problem_data_t *problem_data) safe_waitpid(child, NULL, 0); }
- free_reportfile(file); return 1; /* failure */ }