libcli-cldap: avoid the case local == remote == NULL
authorMatthieu Patou <mat@matws.net>
Fri, 21 Oct 2011 14:11:41 +0000 (16:11 +0200)
committerMatthieu Patou <mat@samba.org>
Fri, 21 Oct 2011 20:29:09 +0000 (22:29 +0200)
libcli/cldap/cldap.c

index 8d7cbb0408b122d49fd5ff972e8ab8b94c6c257f..b7df9d22835c850497ccdbdbb6a26d932dbaac33 100644 (file)
@@ -341,8 +341,12 @@ NTSTATUS cldap_socket_init(TALLOC_CTX *mem_ctx,
 
        if (!local_addr) {
                /*
-                * Here we the address family of the remote address.
+                * Here we know the address family of the remote address.
                 */
+               if (fam == NULL) {
+                       return NT_STATUS_INVALID_PARAMETER_MIX;
+               }
+
                ret = tsocket_address_inet_from_strings(c, fam,
                                                        NULL, 0,
                                                        &any);