summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-jae Park <nicesj.park@samsung.com>2013-10-01 07:32:14 (GMT)
committerSung-jae Park <nicesj.park@samsung.com>2013-10-01 07:32:14 (GMT)
commit315abb9ba1c582ca4ec6d387cb1a29d38f98d6df (patch)
treeb732baf698dfb75e98e9ed43f0e1847227a5ae34
parente7ba941434565f25f3dfe0871a92b18ec37642dc (diff)
downloaddata-provider-master-315abb9ba1c582ca4ec6d387cb1a29d38f98d6df.zip
data-provider-master-315abb9ba1c582ca4ec6d387cb1a29d38f98d6df.tar.gz
data-provider-master-315abb9ba1c582ca4ec6d387cb1a29d38f98d6df.tar.bz2
Increase the refcnt for lazy processing
Change-Id: I67df0f364e3cf38614bc2e8647683f2e920a9f08
-rw-r--r--src/client_life.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client_life.c b/src/client_life.c
index 36ef853..d85cd35 100644
--- a/src/client_life.c
+++ b/src/client_life.c
@@ -238,6 +238,8 @@ static Eina_Bool created_cb(void *data)
* Client PAUSE/RESUME event must has to be sent after created event.
*/
xmonitor_update_state(client_pid(data));
+
+ (void)client_unref(data);
return ECORE_CALLBACK_CANCEL;
}
@@ -274,9 +276,10 @@ HAPI struct client_node *client_create(pid_t pid, int handle)
* \note
* To save the time to send reply packet to the client.
*/
- if (ecore_timer_add(DELAY_TIME, created_cb, client) == NULL) {
+ if (ecore_timer_add(DELAY_TIME, created_cb, client_ref(client)) == NULL) {
ErrPrint("Failed to add a timer for client created event\n");
- client = client_unref(client);
+ client = client_unref(client); /* Decrease refcnt for argument */
+ client = client_unref(client); /* Destroy client object */
return NULL;
}
}