summaryrefslogtreecommitdiff
path: root/which.c
diff options
context:
space:
mode:
authorMatt Kraai2000-09-13 02:46:14 +0000
committerMatt Kraai2000-09-13 02:46:14 +0000
commit322ae93a5e0b78b65831f9fd87fd456eb84d21a1 (patch)
tree5b967e1d873ff6eff8296bf9fda73825f0c55884 /which.c
parentb89075298edf0a471b9046b1f3c8a936e18ead20 (diff)
downloadbusybox-322ae93a5e0b78b65831f9fd87fd456eb84d21a1.zip
busybox-322ae93a5e0b78b65831f9fd87fd456eb84d21a1.tar.gz
Fix calls to {m,c,re}alloc so that they use x{m,c,re}alloc instead of
segfaulting or handling errors the same way themselves.
Diffstat (limited to 'which.c')
-rw-r--r--which.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/which.c b/which.c
index b3fd934..07c0e0d 100644
--- a/which.c
+++ b/which.c
@@ -40,7 +40,7 @@ extern int which_main(int argc, char **argv)
if (!path_list)
path_list = "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin";
- path_parsed = malloc (strlen(path_list) + 1);
+ path_parsed = xmalloc (strlen(path_list) + 1);
strcpy (path_parsed, path_list);
/* Replace colons with zeros in path_parsed and count them */