Rmr sendmsg to free buffer after return
[ric-plt/xapp-frame.git] / 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)
 }