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_2_1_12~53 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=4b2faf5c7839a1f3babf641879cf0193f841c564;p=freeradius.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 d140d81..b406943 100644 --- a/src/main/client.c +++ b/src/main/client.c @@ -1053,7 +1053,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: