laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41305?usp=email )
Change subject: ipa: fix a minor memleak when receiving invalid IPA CCM messages ......................................................................
ipa: fix a minor memleak when receiving invalid IPA CCM messages
Change-Id: I1b828c16350d10398810e60acbb35663f215c63f --- M src/ipa.c 1 file changed, 3 insertions(+), 2 deletions(-)
Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/src/ipa.c b/src/ipa.c index 8035889..6c661a9 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -122,6 +122,7 @@ static int ipa_rx_msg_ccm(struct osmo_ss7_asp *asp, struct msgb *msg) { uint8_t msg_type = msg->l2h[0]; + int rc = 0;
LOGPASP(asp, DLSS7, LOGL_DEBUG, "%s:%s\n", __func__, msgb_hexdump(msg));
@@ -145,12 +146,12 @@ default: LOGPASP(asp, DLSS7, LOGL_NOTICE, "Unknown CCM Message 0x%02x: %s\n", msg_type, msgb_hexdump(msg)); - return -1; + rc = -1; }
msgb_free(msg);
- return 0; + return rc; }
struct osmo_ss7_as *ipa_find_as_for_asp(struct osmo_ss7_asp *asp)