Commit e08562c2 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

ipc_ns: free allocated objects at the end

ipc_ns.c:464:3: warning: Memory is never released; potential leak of
memory pointed to by 'values'
                return;
                ^
1 warning generated.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 7eabe41f
......@@ -460,8 +460,10 @@ static void ipc_sem_handler(int fd, void *obj, int show_pages_content)
values = xmalloc(size);
if (values == NULL)
return;
if (read_img_buf(fd, values, round_up(size, sizeof(u64))) <= 0)
if (read_img_buf(fd, values, round_up(size, sizeof(u64))) <= 0) {
xfree(values);
return;
}
pr_msg_ipc_sem_array(e->nsems, values);
}
......
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