Fixed prevent the memory leak issue 01/106501/1
authorInHong Han <inhong1.han@samsung.com>
Thu, 22 Dec 2016 02:27:26 +0000 (11:27 +0900)
committerInHong Han <inhong1.han@samsung.com>
Thu, 22 Dec 2016 02:27:26 +0000 (11:27 +0900)
Change-Id: I6ccaaa8244125011af0ac70697fda9c3b59342c0

src/e_mod_main.c

index 6cba64f3740c95d46e0bfdfc1036867eb34d4813..c2cb4d29b910b54acb0550c63d1bae65b33fa6c1 100644 (file)
@@ -1808,10 +1808,6 @@ _e_text_cb_bind_input_method(struct wl_client *client, void *data, uint32_t vers
 
    if (!input_method) return;
 
-   resource = wl_resource_create(client, &wl_input_method_interface, 1, id);
-   if (EINA_UNLIKELY(!resource))
-     return;
-
    if (input_method->resource)
      _e_text_input_method_cb_unbind(input_method->resource);
 
@@ -1822,6 +1818,10 @@ _e_text_cb_bind_input_method(struct wl_client *client, void *data, uint32_t vers
         return;
      }
 
+   resource = wl_resource_create(client, &wl_input_method_interface, 1, id);
+   if (EINA_UNLIKELY(!resource))
+     return;
+
    input_method->resource = resource;
 
    wl_resource_set_implementation(resource, NULL, input_method,