projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1d9984
)
Allow empty strings to mean NULL
author
Alan T. DeKok
<aland@freeradius.org>
Sat, 13 Aug 2011 14:56:28 +0000
(10:56 -0400)
committer
Alan T. DeKok
<aland@freeradius.org>
Sat, 13 Aug 2011 14:56:28 +0000
(10:56 -0400)
this lets us specify the default (i.e. NULL) virtual server
src/main/client.c
patch
|
blob
|
history
diff --git
a/src/main/client.c
b/src/main/client.c
index
d140d81
..
b406943
100644
(file)
--- 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: