summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorroot <root@localhost.localdomain>2009-05-04 12:00:19 +0200
committerroot <root@localhost.localdomain>2009-05-04 12:00:19 +0200
commit6245202e7fc76992b838613a1c2bde79387a28c0 (patch)
tree375ceb769b6e1d373b67963220aa20afd22fc200 /shell
parent62851171db373fc24784357dc986c28058b68edf (diff)
downloadbusybox-w32-6245202e7fc76992b838613a1c2bde79387a28c0.tar.gz
busybox-w32-6245202e7fc76992b838613a1c2bde79387a28c0.tar.bz2
busybox-w32-6245202e7fc76992b838613a1c2bde79387a28c0.zip
hush: small fix for unset -f on NOMMU.
Signed-off-by: root <root@localhost.localdomain>
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/shell/hush.c b/shell/hush.c
index d1f674e9d..370e0d71a 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -2924,13 +2924,13 @@ static void unset_func(const char *name)
2924 while ((funcp = *funcpp) != NULL) { 2924 while ((funcp = *funcpp) != NULL) {
2925 if (strcmp(funcp->name, name) == 0) { 2925 if (strcmp(funcp->name, name) == 0) {
2926 *funcpp = funcp->next; 2926 *funcpp = funcp->next;
2927 /* funcp is unlinked now, deleting it */ 2927 /* funcp is unlinked now, deleting it.
2928 free(funcp->name); 2928 * Note: if !funcp->body, the function was created by
2929 /* Note: if !funcp->body, do not free body_as_string! 2929 * "-F name body", do not free ->body_as_string
2930 * This is a special case of "-F name body" function: 2930 * and ->name as they were not malloced. */
2931 * body_as_string was not malloced! */
2932 if (funcp->body) { 2931 if (funcp->body) {
2933 free_pipe_list(funcp->body); 2932 free_pipe_list(funcp->body);
2933 free(funcp->name);
2934# if !BB_MMU 2934# if !BB_MMU
2935 free(funcp->body_as_string); 2935 free(funcp->body_as_string);
2936# endif 2936# endif