diff libfdcore/p_ce.c @ 1230:e72c9dad62ac

Fix issue with generating Failed-AVP when the error is DIAMETER_MISSING_AVP. Also fix a memory leak in that case
author Sebastien Decugis <sdecugis@freediameter.net>
date Sun, 21 Jul 2013 11:57:39 +0200
parents 60e7b02a3ce7
children 8f9684264fe0
line wrap: on
line diff
--- a/libfdcore/p_ce.c	Thu Jul 18 16:08:54 2013 +0200
+++ b/libfdcore/p_ce.c	Sun Jul 21 11:57:39 2013 +0200
@@ -636,6 +636,10 @@
 	CHECK_FCT_DO( fd_msg_rescode_set(*cer, error->pei_errcode, error->pei_message, error->pei_avp, 1 ), goto destroy );
 	CHECK_FCT_DO( fd_out_send(cer, *recv_cnx, NULL), goto destroy );
 	
+	if (error->pei_avp_free) {
+		fd_msg_free(error->pei_avp);
+	}
+	
 	/* And now destroy this connection */
 destroy:
 	fd_cnx_destroy(*recv_cnx);
"Welcome to our mercurial repository"