浏览代码

p9_client_write(): avoid double p9_free_req()

Braino in "9p: switch p9_client_write() to passing it struct iov_iter *";
if response is impossible to parse and we discard the request, get the
out of the loop right there.

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 10 年之前
父节点
当前提交
67e808fbb0
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      net/9p/client.c

+ 1 - 0
net/9p/client.c

@@ -1648,6 +1648,7 @@ p9_client_write(struct p9_fid *fid, u64 offset, struct iov_iter *from, int *err)
 		if (*err) {
 		if (*err) {
 			trace_9p_protocol_dump(clnt, req->rc);
 			trace_9p_protocol_dump(clnt, req->rc);
 			p9_free_req(clnt, req);
 			p9_free_req(clnt, req);
+			break;
 		}
 		}
 
 
 		p9_debug(P9_DEBUG_9P, "<<< RWRITE count %d\n", count);
 		p9_debug(P9_DEBUG_9P, "<<< RWRITE count %d\n", count);