diff --git a/net/9p/conv.c b/net/9p/conv.c
index 37451178e7618013eb38ab7c2f9fae79308b3391..f2a041cb508a146264c9230368fa15acdcf9050b 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)) {