From 8dca18a71a813719e1c20b1ff909ed3aae32cf40 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Mon, 24 Oct 2011 17:22:21 +1100 Subject: s4-dnsserver: Handle the case when the dns name is NULL Signed-off-by: Andrew Tridgell --- source4/rpc_server/dnsserver/dnsdata.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/rpc_server') diff --git a/source4/rpc_server/dnsserver/dnsdata.c b/source4/rpc_server/dnsserver/dnsdata.c index 2dacda7f49..d9e708f457 100644 --- a/source4/rpc_server/dnsserver/dnsdata.c +++ b/source4/rpc_server/dnsserver/dnsdata.c @@ -128,6 +128,10 @@ int dns_split_name_components(TALLOC_CTX *tmp_ctx, const char *name, char ***com char *str = NULL, *ptr, **list; int count = 0; + if (name == NULL) { + return 0; + } + str = talloc_strdup(tmp_ctx, name); if (!str) { goto failed; -- cgit