diff options
author | Shannon Zhao <zhaoshenglong@huawei.com> | 2015-03-16 09:20:29 +0800 |
---|---|---|
committer | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2015-03-16 11:50:07 +0530 |
commit | 821c447675728ca06c8d2e4ac8a0e7a1adf775b8 (patch) | |
tree | fc6fa3682c3ac4896eacb80d645473e37d641a5b /fsdev/virtfs-proxy-helper.c | |
parent | 9005c3b3efb7eb1b140d2ad0385efff6a3af59c4 (diff) |
fsdev/virtfs-proxy-helper: Fix improper use of negative value
It's detected by coverity. Check the return value of proxy_marshal.
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'fsdev/virtfs-proxy-helper.c')
-rw-r--r-- | fsdev/virtfs-proxy-helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index c1da2d78e7..bf2e5f3331 100644 --- a/fsdev/virtfs-proxy-helper.c +++ b/fsdev/virtfs-proxy-helper.c @@ -262,6 +262,9 @@ static int send_status(int sockfd, struct iovec *iovec, int status) */ msg_size = proxy_marshal(iovec, 0, "ddd", header.type, header.size, status); + if (msg_size < 0) { + return msg_size; + } retval = socket_write(sockfd, iovec->iov_base, msg_size); if (retval < 0) { return retval; |