diff options
author | jjako <jjako> | 2003-10-25 15:40:48 +0000 |
---|---|---|
committer | jjako <jjako> | 2003-10-25 15:40:48 +0000 |
commit | ccc564f878ded6001be9d6c477037274296b36c7 (patch) | |
tree | c5e1620087240ae3880d50a712da18159e6e2688 /gtp/gtp.c | |
parent | 581c9f0e297ce94984b108711c6cccb62c1030f9 (diff) |
Fixed deallocation of pdp context on failed create context.
Diffstat (limited to 'gtp/gtp.c')
-rw-r--r-- | gtp/gtp.c | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -1554,6 +1554,8 @@ int gtp_create_pdp_conf(struct gsn_t *gsn, int version, gtp_errpack(LOG_ERR, __FILE__, __LINE__, peer, pack, len, "Invalid message format"); if (gsn->cb_conf) gsn->cb_conf(type, EOF, pdp, cbp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); + pdp_freepdp(pdp); return EOF; } @@ -1563,6 +1565,8 @@ int gtp_create_pdp_conf(struct gsn_t *gsn, int version, gtp_errpack(LOG_ERR, __FILE__, __LINE__, peer, pack, len, "Missing mandatory information field"); if (gsn->cb_conf) gsn->cb_conf(type, EOF, pdp, cbp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); + pdp_freepdp(pdp); return EOF; } @@ -1586,6 +1590,8 @@ int gtp_create_pdp_conf(struct gsn_t *gsn, int version, gtp_errpack(LOG_ERR, __FILE__, __LINE__, peer, pack, len, "Missing conditional information field"); if (gsn->cb_conf) gsn->cb_conf(type, EOF, pdp, cbp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); + pdp_freepdp(pdp); return EOF; } } @@ -1594,6 +1600,8 @@ int gtp_create_pdp_conf(struct gsn_t *gsn, int version, gsn->missing++; gtp_errpack(LOG_ERR, __FILE__, __LINE__, peer, pack, len, "Missing conditional information field"); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); + pdp_freepdp(pdp); if (gsn->cb_conf) gsn->cb_conf(type, EOF, pdp, cbp); return EOF; } @@ -1604,6 +1612,8 @@ int gtp_create_pdp_conf(struct gsn_t *gsn, int version, gtp_errpack(LOG_ERR, __FILE__, __LINE__, peer, pack, len, "Missing conditional information field"); if (gsn->cb_conf) gsn->cb_conf(type, EOF, pdp, cbp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); + pdp_freepdp(pdp); return EOF; } @@ -1612,6 +1622,8 @@ int gtp_create_pdp_conf(struct gsn_t *gsn, int version, gtp_errpack(LOG_ERR, __FILE__, __LINE__, peer, pack, len, "Missing conditional information field"); if (gsn->cb_conf) gsn->cb_conf(type, EOF, pdp, cbp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); + pdp_freepdp(pdp); return EOF; } } @@ -1622,6 +1634,8 @@ int gtp_create_pdp_conf(struct gsn_t *gsn, int version, gtp_errpack(LOG_ERR, __FILE__, __LINE__, peer, pack, len, "Missing conditional information field"); if (gsn->cb_conf) gsn->cb_conf(type, EOF, pdp, cbp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); + pdp_freepdp(pdp); return EOF; } @@ -1630,6 +1644,8 @@ int gtp_create_pdp_conf(struct gsn_t *gsn, int version, gtp_errpack(LOG_ERR, __FILE__, __LINE__, peer, pack, len, "Missing conditional information field"); if (gsn->cb_conf) gsn->cb_conf(type, EOF, pdp, cbp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); + pdp_freepdp(pdp); return EOF; } } @@ -1639,6 +1655,8 @@ int gtp_create_pdp_conf(struct gsn_t *gsn, int version, gtp_errpack(LOG_ERR, __FILE__, __LINE__, peer, pack, len, "Missing conditional information field"); if (gsn->cb_conf) gsn->cb_conf(type, EOF, pdp, cbp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); + pdp_freepdp(pdp); } if (gtpie_gettlv(ie, GTPIE_EUA, 0, &pdp->eua.l, @@ -1647,6 +1665,8 @@ int gtp_create_pdp_conf(struct gsn_t *gsn, int version, gtp_errpack(LOG_ERR, __FILE__, __LINE__, peer, pack, len, "Missing conditional information field"); if (gsn->cb_conf) gsn->cb_conf(type, EOF, pdp, cbp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); + pdp_freepdp(pdp); return EOF; } @@ -1656,6 +1676,8 @@ int gtp_create_pdp_conf(struct gsn_t *gsn, int version, gtp_errpack(LOG_ERR, __FILE__, __LINE__, peer, pack, len, "Missing conditional information field"); if (gsn->cb_conf) gsn->cb_conf(type, EOF, pdp, cbp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); + pdp_freepdp(pdp); return EOF; } @@ -1665,6 +1687,8 @@ int gtp_create_pdp_conf(struct gsn_t *gsn, int version, gtp_errpack(LOG_ERR, __FILE__, __LINE__, peer, pack, len, "Missing conditional information field"); if (gsn->cb_conf) gsn->cb_conf(type, EOF, pdp, cbp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); + pdp_freepdp(pdp); return EOF; } @@ -1675,10 +1699,12 @@ int gtp_create_pdp_conf(struct gsn_t *gsn, int version, gtp_errpack(LOG_ERR, __FILE__, __LINE__, peer, pack, len, "Missing conditional information field"); if (gsn->cb_conf) gsn->cb_conf(type, EOF, pdp, cbp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); + pdp_freepdp(pdp); return EOF; } } - + } if (gsn->cb_conf) gsn->cb_conf(type, cause, pdp, cbp); |