comparison libfdcore/messages.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 e5010975da35
children 446683efbb1f
comparison
equal deleted inserted replaced
1229:4e52f009861a 1230:e72c9dad62ac
385 /* Create the error message */ 385 /* Create the error message */
386 CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, &m, pei.pei_protoerr ? MSGFL_ANSW_ERROR : 0 ) ); 386 CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, &m, pei.pei_protoerr ? MSGFL_ANSW_ERROR : 0 ) );
387 387
388 /* Set the error code */ 388 /* Set the error code */
389 CHECK_FCT( fd_msg_rescode_set(m, pei.pei_errcode, pei.pei_message, pei.pei_avp, 1 ) ); 389 CHECK_FCT( fd_msg_rescode_set(m, pei.pei_errcode, pei.pei_message, pei.pei_avp, 1 ) );
390
391 /* free the pei AVP to avoid memory leak */
392 if (pei.pei_avp_free) {
393 fd_msg_free(pei.pei_avp);
394 }
390 395
391 *msg = NULL; 396 *msg = NULL;
392 *error = m; 397 *error = m;
393 398
394 } else { 399 } else {
"Welcome to our mercurial repository"