diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-10 01:45:03 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-10 01:45:03 +0000 |
commit | 5cc6459c46a935dc54f28f85abd2797b4bcc2559 (patch) | |
tree | 1071ce8952c7dcf22a670672f72c78b3fbae1ffc | |
parent | 73cb1fdfea01a5b16d906285275fa3805cac01a3 (diff) | |
download | busybox-5cc6459c46a935dc54f28f85abd2797b4bcc2559.tar.gz |
umount: stop using excessive aounts of stack. Surprisingly,
code shrank a lot too
function old new delta
umount_main 751 640 -111
-rw-r--r-- | util-linux/umount.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util-linux/umount.c b/util-linux/umount.c index 7c1b81347..a9d60fc29 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c @@ -25,7 +25,7 @@ int umount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int umount_main(int argc, char **argv) { int doForce; - char path[PATH_MAX + 2]; + char *const path = xmalloc(PATH_MAX + 2); /* to save stack */ struct mntent me; FILE *fp; char *fstype = 0; @@ -155,6 +155,7 @@ int umount_main(int argc, char **argv) free(mtl); mtl = m; } + free(path); } return status; |