X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_utils.h;h=c755845da8908814dafcc740b3020e5bc3fa15fe;hb=5cc86eb25cc33a2cc1472325cffc5634a6c203c6;hp=cd89677f69be0217844e7f886c860b4ce6bdf309;hpb=9634ca974c4418c0800090e33d37ef1fe7e8cb30;p=o-du%2Fl2.git diff --git a/src/du_app/du_utils.h b/src/du_app/du_utils.h index cd89677f6..c755845da 100644 --- a/src/du_app/du_utils.h +++ b/src/du_app/du_utils.h @@ -56,10 +56,14 @@ /* free a static buffer */ #define DU_FREE(_datPtr, _size) \ - if(_datPtr) \ +{ \ + if(_datPtr != NULLP) \ + { \ SPutSBuf(DU_APP_MEM_REGION, DU_POOL, \ - (Data *)_datPtr, _size); - + (Data *)_datPtr, _size); \ + _datPtr = NULLP; \ + } \ +} /* Allocate shared memory to be used for LWLC * during inter-layer communication */ #define DU_ALLOC_SHRABL_BUF(_buf, _size) \