Change in libosmo-netif[master]: fix msgb leak on OSMO_STREAM_SRV_F_FLUSH_DESTROY
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/31368 ) Change subject: fix msgb leak on OSMO_STREAM_SRV_F_FLUSH_DESTROY ...................................................................... fix msgb leak on OSMO_STREAM_SRV_F_FLUSH_DESTROY In osmo_stream_srv_send(), call msgb_free() if the msgb is not enqueued. Before this, osmo_stream_srv_send() enqueues a msgb, assuming the queue will free it. But if OSMO_STREAM_SRV_F_FLUSH_DESTROY is set, it just returns and drops the msgb. There is no rc, so the caller cannot know. Change-Id: I994c5e06a9030cfbf4fca8ab42588c61f7121cee --- M src/stream.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/68/31368/1 diff --git a/src/stream.c b/src/stream.c index 172a299..cbf0b27 100644 --- a/src/stream.c +++ b/src/stream.c @@ -1507,6 +1507,7 @@ OSMO_ASSERT(msg); if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY) { LOGP(DLINP, LOGL_DEBUG, "Connection is being flushed and closed; ignoring new outgoing message\n"); + msgb_free(msg); return; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/31368 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I994c5e06a9030cfbf4fca8ab42588c61f7121cee Gerrit-Change-Number: 31368 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
neels