diff options
author | Peter Stephenson <pws@zsh.org> | 2015-12-07 14:32:52 +0000 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2015-12-07 14:32:52 +0000 |
commit | 0c2d823a7955981e88f7cb5b718a7081d97104f0 (patch) | |
tree | 25269036f634b5127f7579e8e14ce6961ebbebc2 /Src/Zle/zle_thingy.c | |
parent | 54678f2e82908e930fcc0b32369dbff0bff3abed (diff) | |
download | zsh-0c2d823a7955981e88f7cb5b718a7081d97104f0.tar.gz zsh-0c2d823a7955981e88f7cb5b718a7081d97104f0.tar.xz zsh-0c2d823a7955981e88f7cb5b718a7081d97104f0.zip |
37337: Delay freeing widget until not in use.
Diffstat (limited to 'Src/Zle/zle_thingy.c')
-rw-r--r-- | Src/Zle/zle_thingy.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c index 271fd8efc..21495b6f2 100644 --- a/Src/Zle/zle_thingy.c +++ b/Src/Zle/zle_thingy.c @@ -253,9 +253,14 @@ unbindwidget(Thingy t, int override) /* Free a widget. */ /**/ -static void +void freewidget(Widget w) { + if (w->flags & WIDGET_INUSE) { + w->flags |= WIDGET_FREE; + return; + } + if (w->flags & WIDGET_NCOMP) { zsfree(w->u.comp.wid); zsfree(w->u.comp.func); |