From: Juha Hyttinen Date: Tue, 25 Feb 2020 07:20:26 +0000 (+0200) Subject: Rmr sendmsg to free buffer after return X-Git-Tag: v0.0.28^0 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=d1fcac7ec9fb1957caacda20d89bc5e4bd727412;p=ric-plt%2Fxapp-frame.git Rmr sendmsg to free buffer after return Change-Id: I408aadd9d3db7debf466b22778f30f0b325584da Signed-off-by: Juha Hyttinen --- diff --git a/pkg/xapp/rmr.go b/pkg/xapp/rmr.go index fc354c3..49a28d9 100755 --- a/pkg/xapp/rmr.go +++ b/pkg/xapp/rmr.go @@ -307,7 +307,7 @@ func (m *RMRClient) SendBuf(txBuffer *C.rmr_mbuf_t, isRts bool) int { } m.UpdateStatCounter(counterName) - m.Free(currBuffer) + defer m.Free(currBuffer) return int(currBuffer.state) }