aboutsummaryrefslogtreecommitdiffstats
path: root/gtp
diff options
context:
space:
mode:
authorjjako <jjako>2003-10-25 15:40:48 +0000
committerjjako <jjako>2003-10-25 15:40:48 +0000
commitccc564f878ded6001be9d6c477037274296b36c7 (patch)
treec5e1620087240ae3880d50a712da18159e6e2688 /gtp
parent581c9f0e297ce94984b108711c6cccb62c1030f9 (diff)
Fixed deallocation of pdp context on failed create context.
Diffstat (limited to 'gtp')
-rw-r--r--gtp/gtp.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/gtp/gtp.c b/gtp/gtp.c
index fd2105f..7ec08b2 100644
--- a/gtp/gtp.c
+++ b/gtp/gtp.c
@@ -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);