Commit 6a357853 authored by Cedric Roux's avatar Cedric Roux

- Fix memory leak

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4697 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent c1ac956e
...@@ -190,7 +190,7 @@ void *itti_malloc(task_id_t task_id, ssize_t size) ...@@ -190,7 +190,7 @@ void *itti_malloc(task_id_t task_id, ssize_t size)
ptr = malloc(size); ptr = malloc(size);
#endif #endif
DevCheck(ptr != NULL, ptr, size, task_id); DevCheck(ptr != NULL, size, task_id, 0);
return ptr; return ptr;
} }
...@@ -432,6 +432,9 @@ int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, Me ...@@ -432,6 +432,9 @@ int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, Me
destination_task_id, destination_task_id,
itti_get_task_name(destination_task_id)); itti_get_task_name(destination_task_id));
} }
} else {
/* This is a debug message to TASK_UNKNOWN, we can release safely release it */
itti_free(origin_task_id, message);
} }
#if defined(OAI_EMU) || defined(RTAI) #if defined(OAI_EMU) || defined(RTAI)
...@@ -459,6 +462,7 @@ void itti_subscribe_event_fd(task_id_t task_id, int fd) ...@@ -459,6 +462,7 @@ void itti_subscribe_event_fd(task_id_t task_id, int fd)
itti_desc.threads[thread_id].nb_events * sizeof(struct epoll_event)); itti_desc.threads[thread_id].nb_events * sizeof(struct epoll_event));
event.events = EPOLLIN | EPOLLERR; event.events = EPOLLIN | EPOLLERR;
event.data.u64 = 0;
event.data.fd = fd; event.data.fd = fd;
/* Add the event fd to the list of monitored events */ /* Add the event fd to the list of monitored events */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment