summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accel-pppd/ctrl/ipoe/dhcpv4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/ipoe/dhcpv4.c b/accel-pppd/ctrl/ipoe/dhcpv4.c
index fa48636..d3f0010 100644
--- a/accel-pppd/ctrl/ipoe/dhcpv4.c
+++ b/accel-pppd/ctrl/ipoe/dhcpv4.c
@@ -177,7 +177,7 @@ struct dhcpv4_serv *dhcpv4_create(struct triton_context_t *ctx, const char *ifna
serv->hnd.read = dhcpv4_read;
serv->raw_sock = raw_sock;
- str0 = strchr(opt, ',');
+ str0 = opt ? strchr(opt, ',') : NULL;
if (str0) {
str0 = _strdup(str0 + 1);
str = str0;