summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/auth/auth_ntlmssp.c1
-rw-r--r--source3/printing/nt_printing.c9
2 files changed, 8 insertions, 2 deletions
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index f5e5c987ba..f165322f7a 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -58,6 +58,7 @@ NTSTATUS ntlmssp_server_end(NTLMSSP_STATE **ntlmssp_state)
}
talloc_destroy(mem_ctx);
+ *ntlmssp_state = NULL;
return NT_STATUS_OK;
}
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 72e3d38bb3..73f1dd5f0d 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -2738,9 +2738,14 @@ BOOL is_printer_published(int snum, GUID *guid)
SPOOL_DSSPOOLER_KEY)) < 0)
return False;
- ctr = &printer->info_2->data.keys[i].values;
+ if (!(ctr = &printer->info_2->data.keys[i].values)) {
+ return False;
+ }
+
+ if (!(guid_val = regval_ctr_getvalue(ctr, "objectGUID"))) {
+ return False;
+ }
- guid_val = regval_ctr_getvalue(ctr, "objectGUID");
if (regval_size(guid_val) == sizeof(GUID))
memcpy(guid, regval_data_p(guid_val), sizeof(GUID));