BUG 972; check pointer in cli_ds_getprimarydominfo() before trying to copy a structure
authorGerald Carter <jerry@samba.org>
Thu, 15 Jan 2004 05:16:29 +0000 (05:16 +0000)
committerGerald Carter <jerry@samba.org>
Thu, 15 Jan 2004 05:16:29 +0000 (05:16 +0000)
source/rpc_client/cli_ds.c

index 8c2821d5af6e9ff3f349bfd296e2344dc1957386..09e63a471474588880828b873a1e5bd1c718e7b4 100644 (file)
@@ -62,7 +62,7 @@ NTSTATUS cli_ds_getprimarydominfo(struct cli_state *cli, TALLOC_CTX *mem_ctx,
 
        result = r.status;
 
-       if (ctr) {
+       if ( r.ptr && ctr ) {
                ctr->basic = talloc(mem_ctx, sizeof(DSROLE_PRIMARY_DOMAIN_INFO_BASIC));
                if (!ctr->basic)
                        goto done;