summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2011-10-24 17:22:21 +1100
committerAndrew Tridgell <tridge@samba.org>2011-11-02 15:26:54 +1100
commit8dca18a71a813719e1c20b1ff909ed3aae32cf40 (patch)
tree4a3bf2f63dcd8ae628759da57b36608a41b0ebc9
parent6e800bfba708124077defab3c9379db201f4c43c (diff)
downloadsamba-8dca18a71a813719e1c20b1ff909ed3aae32cf40.tar.gz
samba-8dca18a71a813719e1c20b1ff909ed3aae32cf40.tar.bz2
samba-8dca18a71a813719e1c20b1ff909ed3aae32cf40.zip
s4-dnsserver: Handle the case when the dns name is NULL
Signed-off-by: Andrew Tridgell <tridge@samba.org>
-rw-r--r--source4/rpc_server/dnsserver/dnsdata.c4
1 files changed, 4 insertions, 0 deletions
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;