From d64f50acfc01400e7465cf0288df09dfce7c3a94 Mon Sep 17 00:00:00 2001 From: Vivek Ellur Date: Thu, 8 Oct 2015 12:17:29 +0200 Subject: [PATCH] eio_monitor: fix memory leak in eio monitor module Summary: Free the allocated memory in eio monitor win32 module. Signed-off-by: Vivek Ellur Reviewers: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3160 Signed-off-by: Cedric BAIL --- src/lib/eio/eio_monitor_win32.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/eio/eio_monitor_win32.c b/src/lib/eio/eio_monitor_win32.c index 06a5f0c289..43c38f31bd 100644 --- a/src/lib/eio/eio_monitor_win32.c +++ b/src/lib/eio/eio_monitor_win32.c @@ -86,7 +86,10 @@ _eio_monitor_win32_cb(void *data, Ecore_Win32_Handler *wh EINA_UNUSED) return 0; if (fni->FileName[0] == 0) - return ECORE_CALLBACK_CANCEL; + { + free(wname); + return ECORE_CALLBACK_CANCEL; + } memcpy(wname, fni->FileName, fni->FileNameLength); wname[fni->FileNameLength / sizeof(wchar_t)] = 0;