Fixed a memory leak in lash. It seems that close_all was calling close()
[oweals/busybox.git] / tar.c
diff --git a/tar.c b/tar.c
index fb0fcc614dce0f987db583c943c99104d315ee2c..a9363d5ad65385a4062474abb6cd9d79a6b1651a 100644 (file)
--- a/tar.c
+++ b/tar.c
  */
 
 
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_io_error
-#define bb_need_name_longer_than_foo
-#include "messages.c"
 #include <stdio.h>
 #include <dirent.h>
 #include <errno.h>
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "busybox.h"
+#define BB_DECLARE_EXTERN
+#define bb_need_io_error
+#define bb_need_name_longer_than_foo
+#include "messages.c"
 
 #ifdef BB_FEATURE_TAR_GZIP
 extern int unzip(int in, int out);
@@ -214,7 +214,7 @@ extern int tar_main(int argc, char **argv)
        int opt;
 
        if (argc <= 1)
-               usage(tar_usage);
+               show_usage();
 
        if (argv[1][0] != '-') {
                char *tmp = xmalloc(strlen(argv[1]) + 2);
@@ -283,7 +283,7 @@ extern int tar_main(int argc, char **argv)
                                break;
 #endif
                                default:
-                                       usage(tar_usage);
+                                       show_usage();
                }
        }