aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index f4779ee2b..f6190c3e2 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -4751,7 +4751,7 @@ forkchild(struct job *jp, union node *n, int mode)
* Our solution: ONLY bare $(trap) or `trap` is special.
*/
/* Save trap handler strings for trap builtin to print */
- trap_ptr = memcpy(xmalloc(sizeof(trap)), trap, sizeof(trap));
+ trap_ptr = xmemdup(trap, sizeof(trap));
/* Fall through into clearing traps */
}
clear_traps();