Navigation


Changeset 564:603f70bf1453 in freeDiameter


Ignore:
Timestamp:
Sep 17, 2010, 5:23:46 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Cleanly destroy Diameter message when an Accounting Response is not generated in gateway

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_radgw/rgwx_acct.c

    r541 r564  
    12251225static int acct_diam_ans( struct rgwp_config * cs, struct session * session, struct msg ** diam_ans, struct radius_msg ** rad_fw, struct rgw_client * cli, int * stateful )
    12261226{
    1227         struct sess_state * st = NULL;
     1227        struct sess_state * st = NULL, stloc;
    12281228        struct avp *avp, *next;
    12291229        struct avp_hdr *ahdr, *sid, *oh, *or;
     
    12401240                return EINVAL;
    12411241        }
     1242       
     1243        /* Free the state */
     1244        memcpy(&stloc, st, sizeof(struct sess_state));
     1245        free(st);
     1246        st = &stloc;
    12421247       
    12431248        /* Search these AVPs first */
     
    12831288                                /* Dump its content ? */
    12841289                        }
     1290                       
     1291                        /* Now, destroy the Diameter message, since we know it is not converted to RADIUS */
     1292                        CHECK_FCT( fd_msg_free(*diam_ans) );
     1293                        *diam_ans = NULL;
     1294
    12851295                        return -1;
    12861296        }
     
    14261436        */
    14271437
    1428         free(st);
    1429 
    14301438        return 0;
    14311439}
Note: See TracChangeset for help on using the changeset viewer.