rspro_client_fsm: Fix another memory leak
We basically must ensure that all code paths *except* the path leading to rspro_dec_msg() must call msgb_free(msg). This was not the case in two situations, as fixed now. Change-Id: I29f8413bb43b3ebf827be0bceda1a4db1e6e2b7c
This commit is contained in:
parent
6478cdac2d
commit
cacbc2b37d
|
@ -121,8 +121,10 @@ static int srvc_read_cb(struct ipa_client_conn *conn, struct msgb *msg)
|
|||
switch (hh->proto) {
|
||||
case IPAC_PROTO_IPACCESS:
|
||||
rc = ipaccess_bts_handle_ccm(srvc->conn, &srvc->ipa_dev, msg);
|
||||
if (rc < 0)
|
||||
if (rc < 0) {
|
||||
msgb_free(msg);
|
||||
break;
|
||||
}
|
||||
switch (hh->data[0]) {
|
||||
case IPAC_MSGT_PONG:
|
||||
ipa_keepalive_fsm_pong_received(srvc->keepalive_fi);
|
||||
|
@ -130,8 +132,8 @@ static int srvc_read_cb(struct ipa_client_conn *conn, struct msgb *msg)
|
|||
break;
|
||||
default:
|
||||
break;
|
||||
msgb_free(msg);
|
||||
}
|
||||
msgb_free(msg);
|
||||
break;
|
||||
case IPAC_PROTO_OSMO:
|
||||
if (!he || msgb_l2len(msg) < sizeof(*he))
|
||||
|
|
Loading…
Reference in New Issue