projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65ddf77
)
Only call free if it is necessary
author
Eric Andersen
<andersen@codepoet.org>
Tue, 14 Jan 2003 06:40:11 +0000
(06:40 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Tue, 14 Jan 2003 06:40:11 +0000
(06:40 -0000)
shell/ash.c
patch
|
blob
|
history
diff --git
a/shell/ash.c
b/shell/ash.c
index 01a02d375c85bfdc0acf53cb5e63a61d08ceaa96..828a888726604cabe7aab5a8c25be4b699bfaecc 100644
(file)
--- a/
shell/ash.c
+++ b/
shell/ash.c
@@
-1830,7
+1830,8
@@
static void setpwd(const char *val, int setold)
getpwd();
else
curdir = simplify_path(val);
- free(cated);
+ if (cated)
+ free(cated);
INTON;
setvar("PWD", curdir, VEXPORT);
}