diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-02-10 09:51:46 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-02-10 09:51:46 +0000 |
commit | 5c697ae74170d43928cb185f5ac1a9058adcae0b (patch) | |
tree | 1bc668205decf1076e578ba777dc7bcaca9d3845 /fsdev | |
parent | 89db21771782fd6050335e73542064f1187c9ced (diff) | |
parent | 43d735547b2a29cafd7d9529ac38734950b235f7 (diff) |
Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-02-10' into staging
trivial patches for 2015-02-10
# gpg: Signature made Tue 10 Feb 2015 07:27:11 GMT using RSA key ID A4C3D7DB
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg: aka "Michael Tokarev <mjt@corpit.ru>"
# gpg: aka "Michael Tokarev <mjt@debian.org>"
* remotes/mjt/tags/pull-trivial-patches-2015-02-10: (45 commits)
virtio: Fix warning caused by missing 'static' attribute
vga: Fix warning caused by missing 'static' attribute
stubs: Fix warning caused by missing include statement
spice: Add missing 'static' attribute
serial: Fix warnings caused by missing 'static' attribute
moxie: Fix warning caused by missing include statement
migration: Fix warnings caused by missing 'static' attribute
migration: Fix warning caused by missing declaration of vmstate_dummy
disas/sh4: Fix warning caused by missing 'static' attribute
translate-all: Use g_try_malloc() for dynamic translator buffer
vnc: g_realloc() can't fail, bury dead error handling
rdma: g_malloc0() can't fail, bury dead error handling
kvm: g_malloc() can't fail, bury dead error handling
rtl8139: g_malloc() can't fail, bury dead error handling
onenand: g_malloc() can't fail, bury dead error handling
Fix name error in migration stream analyzation script
QJSON: fix typo in author's email address
util/uri: URI member path can be null, compare more carfully
util/uri: realloc2n() can't fail, drop dead error handling
util/uri: uri_new() can't fail, drop dead error handling
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'fsdev')
-rw-r--r-- | fsdev/virtfs-proxy-helper.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index cd291d32f2..c1da2d78e7 100644 --- a/fsdev/virtfs-proxy-helper.c +++ b/fsdev/virtfs-proxy-helper.c @@ -749,24 +749,29 @@ static int proxy_socket(const char *path, uid_t uid, gid_t gid) if (bind(sock, (struct sockaddr *)&proxy, sizeof(struct sockaddr_un)) < 0) { do_perror("bind"); - return -1; + goto error; } if (chown(proxy.sun_path, uid, gid) < 0) { do_perror("chown"); - return -1; + goto error; } if (listen(sock, 1) < 0) { do_perror("listen"); - return -1; + goto error; } size = sizeof(qemu); client = accept(sock, (struct sockaddr *)&qemu, &size); if (client < 0) { do_perror("accept"); - return -1; + goto error; } + close(sock); return client; + +error: + close(sock); + return -1; } static void usage(char *prog) |