revert R190, keep R191
[oweals/opkg-lede.git] / libbb / unzip.c
index 3826316bb168a0e1b51dd2f775ca9834f4c63c42..954ee61a8b8882e4768fc2c610093ba141c86267 100644 (file)
  * See the file algorithm.doc for the compression algorithms and file formats.
  */
 
-#if 0
-static char *license_msg[] = {
-       "   Copyright (C) 1992-1993 Jean-loup Gailly",
-       "   This program is free software; you can redistribute it and/or modify",
-       "   it under the terms of the GNU General Public License as published by",
-       "   the Free Software Foundation; either version 2, or (at your option)",
-       "   any later version.",
-       "",
-       "   This program is distributed in the hope that it will be useful,",
-       "   but WITHOUT ANY WARRANTY; without even the implied warranty of",
-       "   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the",
-       "   GNU General Public License for more details.",
-       "",
-       "   You should have received a copy of the GNU General Public License",
-       "   along with this program; if not, write to the Free Software",
-       "   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.",
-       0
-};
-#endif
-
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <signal.h>
@@ -71,7 +51,7 @@ static FILE *in_file, *out_file;
 
 /* these are freed by gz_close */
 static unsigned char *window;
-static unsigned long *crc_table;
+static unsigned long *crc_table = NULL;
 
 static unsigned long crc; /* shift register contents */
 
@@ -1020,6 +1000,9 @@ extern int unzip(FILE *l_in_file, FILE *l_out_file)
        free(window);
        free(crc_table);
 
+       window = NULL;
+       crc_table = NULL;
+
        return exit_code;
 }