virtio-9p-proxy: fix error return in proxy_init()
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>
This commit is contained in:
parent
660edd4eda
commit
6af76c6f7d
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user