From: Mariusz Kozlowski Date: Tue, 31 Jul 2007 07:39:13 +0000 (-0700) Subject: fs: 9p/conv.c error path fix X-Git-Tag: v2.6.23-rc2~56 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbe06f6bf7e764a9eb0e3cdcec2b12c743f35757;p=linux-2.6 fs: 9p/conv.c error path fix 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 Cc: Latchesar Ionkov Cc: Eric Van Hensbergen Cc: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/net/9p/conv.c b/net/9p/conv.c index 37451178e7..f2a041cb50 100644 --- a/net/9p/conv.c +++ b/net/9p/conv.c @@ -763,6 +763,7 @@ struct p9_fcall *p9_create_twrite(u32 fid, u64 offset, u32 count, if (err) { kfree(fc); fc = ERR_PTR(err); + goto error; } if (buf_check_overflow(bufp)) {