projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
660edd4
)
virtio-9p-proxy: fix error return in proxy_init()
author
Michael Tokarev
<mjt@tls.msk.ru>
Thu, 30 Oct 2014 08:00:01 +0000
(11:00 +0300)
committer
Michael Tokarev
<mjt@tls.msk.ru>
Sun, 2 Nov 2014 07:04:34 +0000
(10:04 +0300)
proxy_init() does not check the return value of connect_namedsocket(),
fix this by rearranging code a little bit.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/9pfs/virtio-9p-proxy.c
patch
|
blob
|
history
diff --git
a/hw/9pfs/virtio-9p-proxy.c
b/hw/9pfs/virtio-9p-proxy.c
index e6bbb06319a125ef0e3a6ccb9b45a043961c75f8..2ec211bbeaf0630811bf4a46a68b17e6fea773ed 100644
(file)
--- a/
hw/9pfs/virtio-9p-proxy.c
+++ b/
hw/9pfs/virtio-9p-proxy.c
@@
-1155,10
+1155,12
@@
static int proxy_init(FsContext *ctx)
sock_id = atoi(ctx->fs_root);
if (sock_id < 0) {
fprintf(stderr, "socket descriptor not initialized\n");
- g_free(proxy);
- return -1;
}
}
+ if (sock_id < 0) {
+ g_free(proxy);
+ return -1;
+ }
g_free(ctx->fs_root);
ctx->fs_root = NULL;