summaryrefslogtreecommitdiff
path: root/source4/dns_server/dns_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dns_server/dns_server.c')
-rw-r--r--source4/dns_server/dns_server.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/dns_server/dns_server.c b/source4/dns_server/dns_server.c
index f9db095e74..28c57c0f6e 100644
--- a/source4/dns_server/dns_server.c
+++ b/source4/dns_server/dns_server.c
@@ -117,8 +117,10 @@ static NTSTATUS dns_process(struct dns_server *dns,
/* TODO: We don't really need an out_packet. */
out_packet = talloc_zero(state, struct dns_name_packet);
- if (in_packet == NULL) return NT_STATUS_NO_MEMORY;
- if (out_packet == NULL) return NT_STATUS_NO_MEMORY;
+ if ((state == NULL) || (in_packet == NULL) || (out_packet == NULL)) {
+ TALLOC_FREE(state);
+ return NT_STATUS_NO_MEMORY;
+ }
dump_data(8, in->data, in->length);