summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2011-10-26 23:58:15 +0200
committerMatthieu Patou <mat@samba.org>2011-11-01 19:02:52 +0100
commitf5fde21ec15c7086311ed297601471b75f03c917 (patch)
tree0e32343800e649244fd5cec1b8ef861093850d82 /source4/lib
parentd95826c218413e4add17c70184bfee7e38de97ff (diff)
downloadsamba-f5fde21ec15c7086311ed297601471b75f03c917.tar.gz
samba-f5fde21ec15c7086311ed297601471b75f03c917.tar.bz2
samba-f5fde21ec15c7086311ed297601471b75f03c917.zip
s4-socket: do not segfault if the socket is NULL
Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Tue Nov 1 19:02:52 CET 2011 on sn-devel-104
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/socket/socket.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/socket/socket.c b/source4/lib/socket/socket.c
index 2dbdaad11d..42eb53abce 100644
--- a/source4/lib/socket/socket.c
+++ b/source4/lib/socket/socket.c
@@ -352,6 +352,9 @@ _PUBLIC_ struct tsocket_address *socket_address_to_tsocket_address(TALLOC_CTX *m
struct tsocket_address *r;
int ret;
+ if (!a) {
+ return NULL;
+ }
if (a->sockaddr) {
ret = tsocket_address_bsd_from_sockaddr(mem_ctx,
a->sockaddr,