X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_utils.h;h=c755845da8908814dafcc740b3020e5bc3fa15fe;hb=de455b62ebaa9e36fe74dc36d342d7f6a22314e1;hp=cd89677f69be0217844e7f886c860b4ce6bdf309;hpb=3445f618e886af3b78ea14d71b776bfb843f1381;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) \