Commit ba62bafe authored by Zhouyi Zhou's avatar Zhouyi Zhou Committed by Linus Torvalds
Browse files

kernel/relay.c: fix potential memory leak

When relay_open_buf() fails in relay_open(), code will goto free_bufs,
but chan is nowhere freed.


Signed-off-by: default avatarZhouyi Zhou <>
Cc: Jens Axboe <>
Cc: Al Viro <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 770a5370
......@@ -614,6 +614,7 @@ free_bufs:
kref_put(&chan->kref, relay_destroy_channel);
return NULL;
Supports Markdown
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