summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/utils/net_rap.c b/source3/utils/net_rap.c
index 605043734c..8d5a3dbf15 100644
--- a/source3/utils/net_rap.c
+++ b/source3/utils/net_rap.c
@@ -249,7 +249,7 @@ static int rap_share_add(struct net_context *c, int argc, const char **argv)
strlcpy((char *)sinfo.share_name, sharename, sizeof(sinfo.share_name));
sinfo.reserved1 = '\0';
sinfo.share_type = 0;
- sinfo.comment = smb_xstrdup(c->opt_comment);
+ sinfo.comment = c->opt_comment ? smb_xstrdup(c->opt_comment) : "";
sinfo.perms = 0;
sinfo.maximum_users = c->opt_maxusers;
sinfo.active_users = 0;