Fixed: If the output file for a dump was non-writeable, gzclose_w()
was called twice on the output file handle, resulting in SIGABRT.
- if (gzclose_w (output) != Z_OK) {
+ ret = gzclose_w (output);
+ if (ret) {
fprintf (stderr, "Error closing %s: %s\n", name_for_error,
gzerror (output, NULL));
ret = EXIT_FAILURE;
output = NULL;
goto DONE;
fprintf (stderr, "Error closing %s: %s\n", name_for_error,
gzerror (output, NULL));
ret = EXIT_FAILURE;
output = NULL;
goto DONE;
+ } else
+ output = NULL;
if (output_file_name) {
ret = rename (tempname, output_file_name);
if (output_file_name) {
ret = rename (tempname, output_file_name);