From: Adrian Bunk Date: Thu, 26 Jul 2007 17:41:10 +0000 (-0700) Subject: xenbus_xs.c: fix a use-after-free X-Git-Tag: v2.6.23-rc2~210 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98ac0e53facc851f8bc5110039ab05005c0c4736;p=linux-2.6 xenbus_xs.c: fix a use-after-free This patch fixes an obvious use-after-free spotted by the Coverity checker. Signed-off-by: Adrian Bunk Acked-by: Jeremy Fitzhardinge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c index 9e943fbce8..227d53b12a 100644 --- a/drivers/xen/xenbus/xenbus_xs.c +++ b/drivers/xen/xenbus/xenbus_xs.c @@ -782,8 +782,8 @@ static int process_msg(void) msg->u.watch.vec = split(body, msg->hdr.len, &msg->u.watch.vec_size); if (IS_ERR(msg->u.watch.vec)) { - kfree(msg); err = PTR_ERR(msg->u.watch.vec); + kfree(msg); goto out; }