summaryrefslogtreecommitdiff
path: root/source4/lib/socket
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/socket')
-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,