X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/9fd1f2748b3ebb25e52fac67a7e849c564f9a87a..d6e4a058a37bdaea7df8c8d360978c0dc8848fff:/projects/rlm_stg/rlm_stg.c?ds=sidebyside diff --git a/projects/rlm_stg/rlm_stg.c b/projects/rlm_stg/rlm_stg.c index 40306695..20d46a59 100644 --- a/projects/rlm_stg/rlm_stg.c +++ b/projects/rlm_stg/rlm_stg.c @@ -70,6 +70,7 @@ static size_t toReply(STG_RESULT result, REQUEST* request) size_t count = 0; count += toVPS(result.modify, &request->config_items); + pairfree(&request->reply->vps); count += toVPS(result.reply, &request->reply->vps); deletePairs(result.modify); @@ -97,7 +98,7 @@ static STG_PAIR* fromVPS(const VALUE_PAIR* pairs) bzero(res[pos].key, sizeof(res[0].key)); bzero(res[pos].value, sizeof(res[0].value)); strncpy(res[pos].key, pairs->name, sizeof(res[0].key)); - vp_prints_value(res[pos].value, sizeof(res[0].value), pairs, 0); + vp_prints_value(res[pos].value, sizeof(res[0].value), (VALUE_PAIR*)pairs, 0); ++pos; pairs = pairs->next; } @@ -384,7 +385,7 @@ static int stg_detach(void* instance) module_t rlm_stg = { RLM_MODULE_INIT, "stg", - RLM_TYPE_THREAD_SAFE, /* type */ + RLM_TYPE_THREAD_UNSAFE, /* type */ stg_instantiate, /* instantiation */ stg_detach, /* detach */ {