diff options
Diffstat (limited to 'cdr/cdr_radius.c')
-rw-r--r-- | cdr/cdr_radius.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cdr/cdr_radius.c b/cdr/cdr_radius.c index 6d890e764..ae9449466 100644 --- a/cdr/cdr_radius.c +++ b/cdr/cdr_radius.c @@ -219,12 +219,18 @@ static int radius_log(struct ast_cdr *cdr) if (build_radius_record(&send, cdr)) { if (option_debug) ast_log(LOG_DEBUG, "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; } |