From: Adrian Bunk Date: Thu, 26 Jul 2007 17:41:10 +0000 (-0700) Subject: xenbus_xs.c: fix a use-after-free X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=98ac0e53facc851f8bc5110039ab05005c0c4736;p=openwrt%2Fstaging%2Fblogic.git 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 9e943fbce81b..227d53b12a5c 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; }