Updating to newer xapp-frame 0.0.30 version. Prepared also for 4.* version
[ric-plt/submgr.git] / pkg / xapptweaks / rmrwrapper.go
index 5d59363..09fa6de 100644 (file)
@@ -66,8 +66,10 @@ func (tc *RmrWrapper) RmrSend(params *RMRParams, to time.Duration) (err error) {
        }
        if status == false {
                err = fmt.Errorf("Failed with retries(%d) %s", i, params.String())
-               tc.Rmr.Free(params.Mbuf)
-               params.Mbuf = nil
+               if params.Mbuf != nil {
+                       tc.Rmr.Free(params.Mbuf)
+                       params.Mbuf = nil
+               }
        } else {
                tc.CntSentMsg++
        }