[2.6.22.2 review 53/84] fs: 9p/conv.c error path fix

From: Greg KH
Date: Tue Aug 07 2007 - 17:14:51 EST



From: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>


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 <m.kozlowski@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
fs/9p/conv.c | 1 +
1 file changed, 1 insertion(+)

--- a/fs/9p/conv.c
+++ b/fs/9p/conv.c
@@ -742,6 +742,7 @@ struct v9fs_fcall *v9fs_create_twrite(u3
if (err) {
kfree(fc);
fc = ERR_PTR(err);
+ goto error;
}

if (buf_check_overflow(bufp)) {

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/