summaryrefslogtreecommitdiff
path: root/lib/radsec.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2011-03-06 14:30:14 +0100
committerLinus Nordberg <linus@nordu.net>2011-03-06 14:30:14 +0100
commitf87be530d67823a5d82367468e33d58b201ebee1 (patch)
treecd56779320f50aefeb1357dd072c686e59353ac3 /lib/radsec.c
parentc1de57efcaa05f4127a73f99c9f366149dc4b98f (diff)
Don't free config object until we destroy the context.
Diffstat (limited to 'lib/radsec.c')
-rw-r--r--lib/radsec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/radsec.c b/lib/radsec.c
index f8bd246..afb871e 100644
--- a/lib/radsec.c
+++ b/lib/radsec.c
@@ -142,6 +142,11 @@ void rs_context_destroy(struct rs_context *ctx)
r = r->next;
rs_free (ctx, tmp);
}
+
+ if (ctx->cfg)
+ cfg_free (ctx->cfg);
+ ctx->cfg = NULL;
+
rs_free (ctx, ctx);
}