From: Alan T. DeKok Date: Sat, 13 Aug 2011 14:56:28 +0000 (-0400) Subject: Allow empty strings to mean NULL X-Git-Tag: release_3_0_0_beta0~680 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4250eff922c6c198b1f8b252efcb60e807cfb92f;p=thirdparty%2Ffreeradius-server.git Allow empty strings to mean NULL this lets us specify the default (i.e. NULL) virtual server --- diff --git a/src/main/client.c b/src/main/client.c index 6204759cb09..e986b1c2909 100644 --- a/src/main/client.c +++ b/src/main/client.c @@ -1070,7 +1070,11 @@ RADCLIENT *client_create(RADCLIENT_LIST *clients, REQUEST *request) case PW_TYPE_STRING_PTR: p = (char **) ((char *) c + dynamic_config[i].offset); if (*p) free(*p); - *p = strdup(vp->vp_strvalue); + if (vp->vp_strvalue[0]) { + *p = strdup(vp->vp_strvalue); + } else { + *p = NULL; + } break; case PW_TYPE_BOOLEAN: