From: Christophe CURIS <christophe.cu...@free.fr>

As pointed by Coverity, there is one case where the application dictionary
which is created temporarily (when saving the changes in the Window
Inspector) could be left allocated. It is now freed in the common path to
avoid problems.

Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>
---
 src/winspector.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/winspector.c b/src/winspector.c
index e814fa3..679c56f 100644
--- a/src/winspector.c
+++ b/src/winspector.c
@@ -598,7 +598,6 @@ static void saveSettings(WMWidget *button, void 
*client_data)
                                WMPutInPLDictionary(dict, key2, appDic);
                }
                WMReleasePropList(key2);
-               WMReleasePropList(appDic);
        } else if (wwin->main_window != wwin->client_win) {
                WApplication *wapp = wApplicationOf(wwin->main_window);
 
@@ -617,13 +616,12 @@ static void saveSettings(WMWidget *button, void 
*client_data)
                                        WMPutInPLDictionary(dict, key2, appDic);
                        }
                        WMReleasePropList(key2);
-                       WMReleasePropList(appDic);
                }
        } else {
                WMMergePLDictionaries(winDic, appDic, True);
                different |= different2;
-               WMReleasePropList(appDic);
        }
+       WMReleasePropList(appDic);
 
        WMRemoveFromPLDictionary(dict, key);
        if (different)
-- 
1.9.2


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to