summaryrefslogtreecommitdiff
path: root/accel-pptpd/cli/std_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pptpd/cli/std_cmd.c')
-rw-r--r--accel-pptpd/cli/std_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pptpd/cli/std_cmd.c b/accel-pptpd/cli/std_cmd.c
index 75ff900d..0d234938 100644
--- a/accel-pptpd/cli/std_cmd.c
+++ b/accel-pptpd/cli/std_cmd.c
@@ -123,10 +123,10 @@ static int show_ses_exec(const char *cmd, char * const *fields, int fields_cnt,
}
if (order == ORDER_USERNAME)
- row->order_key = _strdup(ppp->username);
+ row->order_key = ppp->username ? _strdup(ppp->username) : _strdup("");
if (match == MATCH_USERNAME)
- row->match_key = _strdup(ppp->username);
+ row->match_key = ppp->username ? _strdup(ppp->username) : _strdup("");
u_inet_ntoa(ppp->peer_ipaddr, ip_str);