Commit 98ac0e53 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

xenbus_xs.c: fix a use-after-free

This patch fixes an obvious use-after-free spotted by the Coverity checker.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Acked-by: default avatarJeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4c6a1c13
...@@ -782,8 +782,8 @@ static int process_msg(void) ...@@ -782,8 +782,8 @@ static int process_msg(void)
msg->u.watch.vec = split(body, msg->hdr.len, msg->u.watch.vec = split(body, msg->hdr.len,
&msg->u.watch.vec_size); &msg->u.watch.vec_size);
if (IS_ERR(msg->u.watch.vec)) { if (IS_ERR(msg->u.watch.vec)) {
kfree(msg);
err = PTR_ERR(msg->u.watch.vec); err = PTR_ERR(msg->u.watch.vec);
kfree(msg);
goto out; goto out;
} }
......
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