aboutsummaryrefslogtreecommitdiffstats
path: root/cdr
diff options
context:
space:
mode:
Diffstat (limited to 'cdr')
-rw-r--r--cdr/cdr_radius.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/cdr/cdr_radius.c b/cdr/cdr_radius.c
index c2e4d4cf9..5d177f359 100644
--- a/cdr/cdr_radius.c
+++ b/cdr/cdr_radius.c
@@ -205,12 +205,18 @@ static int radius_log(struct ast_cdr *cdr)
if (build_radius_record(&send, cdr)) {
ast_debug(1, "Unable to create RADIUS record. CDR not recorded!\n");
- return result;
+ goto return_cleanup;
}
result = rc_acct(rh, 0, send);
- if (result != OK_RC)
+ if (result != OK_RC) {
ast_log(LOG_ERROR, "Failed to record Radius CDR record!\n");
+ }
+
+return_cleanup:
+ if (send) {
+ rc_avpair_free(send);
+ }
return result;
}