diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-01-14 06:40:11 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-01-14 06:40:11 +0000 |
commit | 4b525addb89d9e66b65e0a54ef7c15b677a74758 (patch) | |
tree | 83ef3b1d22ecac64c9566d3dcce1aa393cc53b7e /shell | |
parent | 65ddf77fbd0f1ec832f062cf05a15bbd2cf1080e (diff) | |
download | busybox-w32-4b525addb89d9e66b65e0a54ef7c15b677a74758.tar.gz busybox-w32-4b525addb89d9e66b65e0a54ef7c15b677a74758.tar.bz2 busybox-w32-4b525addb89d9e66b65e0a54ef7c15b677a74758.zip |
Only call free if it is necessary
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 01a02d375..828a88872 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -1830,7 +1830,8 @@ static void setpwd(const char *val, int setold) | |||
1830 | getpwd(); | 1830 | getpwd(); |
1831 | else | 1831 | else |
1832 | curdir = simplify_path(val); | 1832 | curdir = simplify_path(val); |
1833 | free(cated); | 1833 | if (cated) |
1834 | free(cated); | ||
1834 | INTON; | 1835 | INTON; |
1835 | setvar("PWD", curdir, VEXPORT); | 1836 | setvar("PWD", curdir, VEXPORT); |
1836 | } | 1837 | } |