Commit 1dc83a2f authored by Simon Que's avatar Simon Que Committed by Hari Kanigeri

SYSLINK: ipc - heapbuf_close frees obj

When a heapbuf object is created, there are two memory buffers allocated -- one
for the handle and one for the object itself.  That is in _heapbuf_create.  In
heapbuf_delete, both are freed.  But in heapbuf_close, only the handle is freed.
The object pointer is not freed and caused a memory leak.  This patch adds a
call to free the object.
Signed-off-by: default avatarSimon Que <sque@ti.com>
parent 22167913
......@@ -837,6 +837,7 @@ int heapbuf_close(void *handle_ptr)
/* Delete the list */
listmp_sharedmemory_close((listmp_sharedmemory_handle *)
obj->free_list);
kfree(obj);
kfree(handle);
handle = NULL;
}
......
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