mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:37:12 +00:00
Fix a couple of memory leaks, one when creating a new pane and one when
adding formats onto the queue item.
This commit is contained in:
3
spawn.c
3
spawn.c
@ -366,6 +366,7 @@ spawn_pane(struct spawn_context *sc, char **cause)
|
||||
window_remove_pane(w, new_wp);
|
||||
}
|
||||
sigprocmask(SIG_SETMASK, &oldset, NULL);
|
||||
environ_free(child);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@ -443,6 +444,8 @@ complete:
|
||||
sigprocmask(SIG_SETMASK, &oldset, NULL);
|
||||
window_pane_set_event(new_wp);
|
||||
|
||||
environ_free(child);
|
||||
|
||||
if (sc->flags & SPAWN_RESPAWN)
|
||||
return (new_wp);
|
||||
if ((~sc->flags & SPAWN_DETACHED) || w->active == NULL) {
|
||||
|
Reference in New Issue
Block a user