aboutsummaryrefslogtreecommitdiff
path: root/debianutils/which.c
diff options
context:
space:
mode:
Diffstat (limited to 'debianutils/which.c')
-rw-r--r--debianutils/which.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/debianutils/which.c b/debianutils/which.c
index 3197ddac1..b31d61871 100644
--- a/debianutils/which.c
+++ b/debianutils/which.c
@@ -12,7 +12,7 @@
12//config: which is used to find programs in your PATH and 12//config: which is used to find programs in your PATH and
13//config: print out their pathnames. 13//config: print out their pathnames.
14 14
15//applet:IF_WHICH(APPLET(which, BB_DIR_USR_BIN, BB_SUID_DROP)) 15//applet:IF_WHICH(APPLET_NOFORK(which, which, BB_DIR_USR_BIN, BB_SUID_DROP, which))
16 16
17//kbuild:lib-$(CONFIG_WHICH) += which.o 17//kbuild:lib-$(CONFIG_WHICH) += which.o
18 18
@@ -56,6 +56,8 @@ int which_main(int argc UNUSED_PARAM, char **argv)
56 char *p; 56 char *p;
57 57
58 path = tmp = xstrdup(env_path); 58 path = tmp = xstrdup(env_path);
59//NOFORK FIXME: nested xmallocs (one is inside find_executable())
60//can leak memory on failure
59 while ((p = find_executable(*argv, &tmp)) != NULL) { 61 while ((p = find_executable(*argv, &tmp)) != NULL) {
60 missing = 0; 62 missing = 0;
61 puts(p); 63 puts(p);