osmo_ss7: Fix msgb memory leaks in error paths (asp not connected)
Change-Id: I031d90348ea243ac5dbdde14365528f3ec8e3709
This commit is contained in:
parent
72f12f7543
commit
632ab5a359
|
@ -1419,6 +1419,7 @@ int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg)
|
|||
if (!asp->server) {
|
||||
LOGPASP(asp, DLSS7, LOGL_ERROR, "Cannot transmit, no asp->server\n");
|
||||
/* FIXME: what to do here? delete the route? send DUNA? */
|
||||
msgb_free(msg);
|
||||
return -EIO;
|
||||
}
|
||||
osmo_stream_srv_send(asp->server, msg);
|
||||
|
@ -1426,6 +1427,7 @@ int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg)
|
|||
if (!asp->client) {
|
||||
LOGPASP(asp, DLSS7, LOGL_ERROR, "Cannot transmit, no asp->client\n");
|
||||
/* FIXME: what to do here? delete the route? send DUNA? */
|
||||
msgb_free(msg);
|
||||
return -EIO;
|
||||
}
|
||||
osmo_stream_cli_send(asp->client, msg);
|
||||
|
|
Loading…
Reference in New Issue