From: Mariusz Kozlowski Date: Thu, 23 Aug 2007 15:24:28 +0000 (-0500) Subject: 9p: fix bad error path in conversion routines X-Git-Tag: v2.6.23-rc4~25^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02881d94780faa86e32952e46381f7cd4c78d5ac;p=linux-2.6 9p: fix bad error path in conversion routines When buf_check_overflow() returns != 0 we will hit kfree(ERR_PTR(err)) and it will not be happy about it. Signed-off-by: Mariusz Kozlowski Signed-off-by: Eric Van Hensbergen --- diff --git a/net/9p/conv.c b/net/9p/conv.c index f2a041cb50..d979d958ea 100644 --- a/net/9p/conv.c +++ b/net/9p/conv.c @@ -796,6 +796,7 @@ struct p9_fcall *p9_create_twrite_u(u32 fid, u64 offset, u32 count, if (err) { kfree(fc); fc = ERR_PTR(err); + goto error; } if (buf_check_overflow(bufp)) {