Fix a memory leak if parent directory creation failed.
[oweals/busybox.git] / libbb / gz_open.c
index b23920b167900aa5c09348f9d161c1cf869e515e..ef30ff8945b500149490e1be187674908dd74e79 100644 (file)
@@ -15,7 +15,7 @@ extern FILE *gz_open(FILE *compressed_file, int *pid)
                return(NULL);
        }
        if ((*pid = fork()) == -1) {
-               error_msg("fork failured");
+               error_msg("fork failed");
                return(NULL);
        }
        if (*pid==0) {
@@ -29,7 +29,7 @@ extern FILE *gz_open(FILE *compressed_file, int *pid)
        }
        close(unzip_pipe[1]);
        if (unzip_pipe[0] == -1) {
-               error_msg("Couldnt initialise gzip stream");
+               error_msg("gzip stream init failed");
        }
        return(fdopen(unzip_pipe[0], "r"));
 }