]> xenbits.xensource.com Git - libvirt.git/commitdiff
Make sure we reset the umask on the error path
authorGuido Günther <agx@sigxcpu.org>
Wed, 9 Mar 2011 13:19:56 +0000 (14:19 +0100)
committerGuido Günther <agx@sigxcpu.org>
Thu, 10 Mar 2011 21:07:24 +0000 (22:07 +0100)
daemon/libvirtd.c

index 9a5a53e3e3aab93f8d0a3acb94e03bfc81f3ffba..1e41feb1db0e87d08fe7c64a36f7e5dcf23e860d 100644 (file)
@@ -603,6 +603,7 @@ static int qemudListenUnix(struct qemud_server *server,
     if (bind(sock->fd, &sock->addr.data.sa, sock->addr.len) < 0) {
         VIR_ERROR(_("Failed to bind socket to '%s': %s"),
                   path, virStrerror(errno, ebuf, sizeof ebuf));
+        umask(oldmask);
         goto cleanup;
     }
     umask(oldmask);