simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Mon Jun 3 19:09:28 BST 2019


TL;DR:
  29cb7e40 GTK: fix handling of delete event in Change Settings dialog.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2019-06-03 19:09:28

commit 29cb7e40eb5e0a5bf33b4d6281f513a465231d41
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=29cb7e40eb5e0a5bf33b4d6281f513a465231d41;hp=45be166be3ac000b13cbc5f9a0d858c690a8ae4c
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Jun 3 19:05:00 2019 +0100

    GTK: fix handling of delete event in Change Settings dialog.
    
    If the user closes the Change Settings dialog box using the close
    button provided by the window manager (or some analogous thing that
    generates the same X11 event) instead of using the Cancel button
    within the dialog itself, then after_change_settings_dialog() gets
    called with retval < 0, which triggers an early return path in which
    we forget to call unregister_dialog(), and as a result, assertions
    fail all over the place the _next_ time you try to put up a Change
    Settings dialog.
    
    Also, the early return causes ctx.newconf to be memory-leaked. So
    rather than just moving the unregister_dialog() call to above the
    early return, a better fix is to remove the early return completely,
    and simply treat retval<0 the same as retval==0: it doesn't matter
    _how_ the user closed the config box without committing the changes,
    it only matters that they did.

 unix/gtkwin.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)



More information about the tartarus-commits mailing list