aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-04-12 17:08:53 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-04-12 17:08:53 +0000
commit7cced6e57404cc1043a1b0dd0491aef2f792497e (patch)
tree1c35d9859386855c8b5c4d9188f50f195eadc3bb /shell/hush.c
parent0de3c55b4286498753751b7cd63f3af12f0ebd0f (diff)
downloadbusybox-w32-7cced6e57404cc1043a1b0dd0491aef2f792497e.tar.gz
busybox-w32-7cced6e57404cc1043a1b0dd0491aef2f792497e.tar.bz2
busybox-w32-7cced6e57404cc1043a1b0dd0491aef2f792497e.zip
fix realloc-of-non-malloced pointer, and reduce size while at it
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 9af7f5105..eae0e10f5 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -423,7 +423,7 @@ static const struct built_in_command bltins[] = {
423static const char *set_cwd(void) 423static const char *set_cwd(void)
424{ 424{
425 if (cwd == bb_msg_unknown) 425 if (cwd == bb_msg_unknown)
426 cwd = NULL; /* xrealloc_getcwd_or_warn(arg) called free(arg) */ 426 cwd = NULL; /* xrealloc_getcwd_or_warn(arg) calls free(arg)! */
427 cwd = xrealloc_getcwd_or_warn((char *)cwd); 427 cwd = xrealloc_getcwd_or_warn((char *)cwd);
428 if (!cwd) 428 if (!cwd)
429 cwd = bb_msg_unknown; 429 cwd = bb_msg_unknown;