summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-04-28 12:48:39 +0200
committerHarald Welte <laforge@gnumonks.org>2016-04-28 12:48:39 +0200
commit19c8c2c9b13ad2c33ea59fcd2fbebe56189b7c23 (patch)
treedc29e09ab3703753699511ba01125c03d53c697b
parentb36b99b96e4b90f8f1c4507172d423745b7465e1 (diff)
ensure we release memory for all received msgb.
-rw-r--r--osmo-gsup-hlr/src/gsup_server.c2
-rw-r--r--osmo-gsup-hlr/src/hlr.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/osmo-gsup-hlr/src/gsup_server.c b/osmo-gsup-hlr/src/gsup_server.c
index 15af9c8..f5515e3 100644
--- a/osmo-gsup-hlr/src/gsup_server.c
+++ b/osmo-gsup-hlr/src/gsup_server.c
@@ -60,9 +60,9 @@ static int osmo_gsup_server_read_cb(struct ipa_server_conn *conn,
rc = ipa_server_conn_ccm(conn, msg);
if (rc < 0) {
/* conn is already invalid here! */
- msgb_free(msg);
return -1;
}
+ msgb_free(msg);
return 0;
}
diff --git a/osmo-gsup-hlr/src/hlr.c b/osmo-gsup-hlr/src/hlr.c
index 2a93d7d..054558e 100644
--- a/osmo-gsup-hlr/src/hlr.c
+++ b/osmo-gsup-hlr/src/hlr.c
@@ -65,6 +65,7 @@ static int read_cb(struct osmo_gsup_conn *conn, struct msgb *msg)
gsup.message_type);
break;
}
+ msgb_free(msg);
return 0;
}