From f4f96a8fb7d1e43605fc74ba9eac35213e457abf Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sat, 31 May 2014 19:58:46 +0200 Subject: [PATCH] WPrefs: fix memory leak when editing a delay for the dock (Coverity #50156) As reported by Coverity, the return string of WMGetTextFieldText is malloced so it needs to be freed. Signed-off-by: Christophe CURIS --- WPrefs.app/Docks.c | 1 + 1 file changed, 1 insertion(+) diff --git a/WPrefs.app/Docks.c b/WPrefs.app/Docks.c index 2a5265aa..84049419 100644 --- a/WPrefs.app/Docks.c +++ b/WPrefs.app/Docks.c @@ -120,6 +120,7 @@ static void autoDelayChanged(void *observerData, WMNotification *notification) } char *value = WMGetTextFieldText(anAutoDelayT); adjustButtonSelectionBasedOnValue(panel, row, value); + free(value); return; } }