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

As reported by Coverity, it was possible to return early from the function
'listCallback' without de-allocating a temporary string. The string is now
requested after this early return.

Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>
---
 src/dialog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dialog.c b/src/dialog.c
index 6b26aef..90e7192 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -664,13 +664,13 @@ static void listCallback(void *self, void *data)
                if (item == NULL)
                        return;
                path = item->text;
-               tmp = wexpandpath(path);
 
                item = WMGetListSelectedItem(panel->iconList);
                if (item == NULL)
                        return;
                iconFile = item->text;
 
+               tmp = wexpandpath(path);
                path = wmalloc(strlen(tmp) + strlen(iconFile) + 4);
                strcpy(path, tmp);
                strcat(path, "/");
-- 
1.9.2


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

Reply via email to