bufferqueue: fix memory leak 40/49340/1
authorBoram Park <boram1288.park@samsung.com>
Tue, 13 Oct 2015 00:16:17 +0000 (09:16 +0900)
committerBoram Park <boram1288.park@samsung.com>
Tue, 13 Oct 2015 00:53:34 +0000 (09:53 +0900)
Change-Id: I4bfcc20b9dd4ef6f2e5fc5e314287d4fcc8a99f4

src/modules/bufferqueue/e_mod_main.c

index 304d165..8c975bc 100644 (file)
@@ -182,12 +182,21 @@ _e_bq_mgr_new(char *sock_name)
 
    /* try to get the current compositor */
    if (!(comp = e_comp))
-     return NULL;
+     {
+        free(bq_mgr);
+        return NULL;
+     }
 
    if ((comp->comp_type == E_PIXMAP_TYPE_X) ||
        (sock_name != NULL))
      {
         bq_mgr->wdpy = wl_display_create();
+        if (bq_mgr->wdpy)
+          {
+             free(bq_mgr);
+             return NULL;
+          }
+
         bq_mgr->loop = wl_display_get_event_loop(bq_mgr->wdpy);
         if (bq_mgr->loop)
           {