=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/spawn.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- src/usr.bin/tmux/spawn.c 2020/04/13 20:51:57 1.21 +++ src/usr.bin/tmux/spawn.c 2020/04/23 05:48:42 1.22 @@ -1,4 +1,4 @@ -/* $OpenBSD: spawn.c,v 1.21 2020/04/13 20:51:57 nicm Exp $ */ +/* $OpenBSD: spawn.c,v 1.22 2020/04/23 05:48:42 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott @@ -366,6 +366,7 @@ window_remove_pane(w, new_wp); } sigprocmask(SIG_SETMASK, &oldset, NULL); + environ_free(child); return (NULL); } @@ -442,6 +443,8 @@ sigprocmask(SIG_SETMASK, &oldset, NULL); window_pane_set_event(new_wp); + + environ_free(child); if (sc->flags & SPAWN_RESPAWN) return (new_wp);