Rmr sendmsg to free buffer after return 65/2565/1 v0.0.28
authorJuha Hyttinen <juha.hyttinen@nokia.com>
Tue, 25 Feb 2020 07:20:26 +0000 (09:20 +0200)
committerJuha Hyttinen <juha.hyttinen@nokia.com>
Tue, 25 Feb 2020 07:21:47 +0000 (09:21 +0200)
Change-Id: I408aadd9d3db7debf466b22778f30f0b325584da
Signed-off-by: Juha Hyttinen <juha.hyttinen@nokia.com>
pkg/xapp/rmr.go

index fc354c3..49a28d9 100755 (executable)
@@ -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)
 }