From 5b13a1b01518c23f38525ec2ae9b4ac9ca3110cd Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 25 Nov 2017 21:51:45 +0000 Subject: [PATCH] Add a missing conf_copy in gtkapp's Duplicate Session. Without this, the Conf objects in a session and its duplicate were aliases of each other, which could lead to confusing semantic effects if one of the sessions was reconfigured in mid-run, and worse still, a crash if one session got cleaned up and called conf_free on a Conf that the other was still using. None of that was intentional; it was just a matter of forgetting to clone the Conf for the duplicated session. Now we do. --- unix/gtkapp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/gtkapp.c b/unix/gtkapp.c index 8b2a794f..b544684e 100644 --- a/unix/gtkapp.c +++ b/unix/gtkapp.c @@ -196,7 +196,7 @@ void launch_duplicate_session(Conf *conf) { extern const int dup_check_launchable; assert(!dup_check_launchable || conf_launchable(conf)); - new_session_window(conf, NULL); + new_session_window(conf_copy(conf), NULL); } void launch_new_session(void)