git.stg.codes
/
stg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d241dd2
)
Check NULL value pairs.
author
Maxim Mamontov
<faust@stg.dp.ua>
Thu, 15 Oct 2015 14:47:04 +0000
(17:47 +0300)
committer
Maxim Mamontov
<faust@stg.dp.ua>
Thu, 15 Oct 2015 14:47:04 +0000
(17:47 +0300)
projects/rlm_stg/rlm_stg.c
patch
|
blob
|
history
diff --git
a/projects/rlm_stg/rlm_stg.c
b/projects/rlm_stg/rlm_stg.c
index 506545934646fce9f9bf3df0b1531dd91d0456c1..84df4e7b7cbf683d2a44b4e0e129f2431fedf8d9 100644
(file)
--- a/
projects/rlm_stg/rlm_stg.c
+++ b/
projects/rlm_stg/rlm_stg.c
@@
-57,9
+57,11
@@
static size_t toVPS(const STG_PAIR* pairs, VALUE_PAIR** vps)
while (!emptyPair(pair)) {
VALUE_PAIR* vp = pairmake(pair->key, pair->value, T_OP_SET);
- pairadd(vps, vp);
+ if (vp != NULL) {
+ pairadd(vps, vp);
+ ++count;
+ }
++pair;
- ++count;
}
return count;