about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Src/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 53cff375d..9ee1c313f 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3018,7 +3018,7 @@ doshfunc(char *name, List list, LinkList doshargs, int flags, int noreturnval)
 		argzero = ztrdup(argzero);
 	    }
 	}
-	runshfunc(list, wrappers, name);
+	runshfunc(list, wrappers, dupstring(name));
 	if (retflag) {
 	    retflag = 0;
 	    breaks = obreaks;