diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-03-05 19:42:15 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-03-05 19:42:15 +0100 |
commit | 63036a6f3380652c0cb54627bdeabcd212fa2f8c (patch) | |
tree | 90194f23cb1e6ca483e7773233c326a9b705f85f /source3/lib/util_sock.c | |
parent | d41d580c600e3228ff8fee5c16c47580f661a240 (diff) | |
parent | 932c287a406048759fa1ac4bf86e29d96991ded1 (diff) | |
download | samba-63036a6f3380652c0cb54627bdeabcd212fa2f8c.tar.gz samba-63036a6f3380652c0cb54627bdeabcd212fa2f8c.tar.bz2 samba-63036a6f3380652c0cb54627bdeabcd212fa2f8c.zip |
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit 3482cd9b0e81bbc801f1cec33fca82fc45a3ddef)
Diffstat (limited to 'source3/lib/util_sock.c')
-rw-r--r-- | source3/lib/util_sock.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index 71d48d6053..2a65943872 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -370,7 +370,7 @@ void in_addr_to_sockaddr_storage(struct sockaddr_storage *ss, Convert an IPv6 struct in_addr to a struct sockaddr_storage. ********************************************************************/ -void in6_addr_to_sockaddr_storage(struct sockaddr_storage *ss, + void in6_addr_to_sockaddr_storage(struct sockaddr_storage *ss, struct in6_addr ip) { struct sockaddr_in6 *sa = (struct sockaddr_in6 *)ss; @@ -1904,8 +1904,7 @@ int create_pipe_sock(const char *socket_dir, goto out_close; } - asprintf(&path, "%s/%s", socket_dir, socket_name); - if (!path) { + if (asprintf(&path, "%s/%s", socket_dir, socket_name) == -1) { goto out_close; } @@ -1933,7 +1932,8 @@ int create_pipe_sock(const char *socket_dir, out_close: SAFE_FREE(path); - close(sock); + if (sock != -1) + close(sock); out_umask: umask(old_umask); |