summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/nbt_server/wins/winsdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c
index d3f10aa9a4..42381a8772 100644
--- a/source4/nbt_server/wins/winsdb.c
+++ b/source4/nbt_server/wins/winsdb.c
@@ -514,10 +514,10 @@ struct ldb_message *winsdb_message(struct ldb_context *ldb,
msg->dn = winsdb_dn(msg, rec->name);
if (msg->dn == NULL) goto failed;
ret |= ldb_msg_add_fmt(msg, "type", "0x%02X", rec->name->type);
- if (rec->name->name) {
+ if (rec->name->name && *rec->name->name) {
ret |= ldb_msg_add_string(msg, "name", rec->name->name);
}
- if (rec->name->scope) {
+ if (rec->name->scope && *rec->name->scope) {
ret |= ldb_msg_add_string(msg, "scope", rec->name->scope);
}
ret |= ldb_msg_add_fmt(msg, "objectClass", "winsRecord");