From 7c50721747286a9cbaa70cea21f8fa2c140883df Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Fri, 14 May 2021 20:24:51 +0200 Subject: [PATCH] WPrefs: Fix memory leak in Expert tab As reported by Coverity (CID #331553), we leak the allocated string returned by 'WMGetTextFieldText' Signed-off-by: Christophe CURIS --- WPrefs.app/Expert.c | 1 + 1 file changed, 1 insertion(+) diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c index 136074f1..b9f9dc35 100644 --- a/WPrefs.app/Expert.c +++ b/WPrefs.app/Expert.c @@ -315,6 +315,7 @@ static void storeDefaults(_Panel *panel) text = WMGetTextFieldText(panel->textfield[i]); value = atoi(text); + wfree(text); SetIntegerForKey(value, expert_options[i].op_name); break;