e_comp_wl_data: fix resource leaks 57/49357/1
authorMun, Gwan-gyeong <kk.moon@samsung.com>
Tue, 13 Oct 2015 02:27:21 +0000 (11:27 +0900)
committerMun, Gwan-gyeong <kk.moon@samsung.com>
Tue, 13 Oct 2015 02:27:21 +0000 (11:27 +0900)
Change-Id: Ib2d05461fe012b7ba8c685ed766835d47e57226c

src/bin/e_comp_wl_data.c

index cb7c2b61330de721a8535545c20074a3c46775f0..095900fee31c92c3792fcdc74c6515f1128c90de 100644 (file)
@@ -621,7 +621,11 @@ _e_comp_wl_clipboard_source_create(E_Comp_Data *cdata, const char *mime_type, ui
       ecore_main_fd_handler_add(fd, ECORE_FD_READ,
                                 _e_comp_wl_clipboard_source_save,
                                 cdata, NULL, NULL);
-   if (!source->fd_handler) return NULL;
+   if (!source->fd_handler)
+     {
+        E_FREE(source);
+        return NULL;
+     }
 
    source->fd = fd;