]> git.stg.codes - stg.git/blobdiff - projects/rlm_stg/rlm_stg.c
Merge branch 'stg-2.409' into stg-2.409-radius
[stg.git] / projects / rlm_stg / rlm_stg.c
index 506545934646fce9f9bf3df0b1531dd91d0456c1..84df4e7b7cbf683d2a44b4e0e129f2431fedf8d9 100644 (file)
@@ -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);
 
     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;
         ++pair;
-        ++count;
     }
 
     return count;
     }
 
     return count;