/opensaf-code/src/smf/smfd/SmfUtils.cc:705:7: Potential leak of memory pointed to by 'rollbackData' [cplusplus.NewDeleteLeaks]
Should delete allocated memory for rollbackData
when execution is failed.
SmfRollbackData *rollbackData = NULL; if (io_rollbackCcb != NULL) { rollbackData = new (std::nothrow) SmfRollbackData(io_rollbackCcb); if (rollbackData == NULL) { LOG_WA("%s: Failed to create SmfRollbackData C++ object, no memory", __FUNCTION__); result = SA_AIS_ERR_NO_MEMORY; break; } } // Verify the create descriptor for this operation and fill in the // attributes result = imm_operation->Execute(rollbackData); if (result != SA_AIS_OK) { LOG_WA("%s: imm_operation->Execute Fail, %s", __FUNCTION__, saf_error(result)); break; }
commit eb5a6d7821e1c44f616f429501f12da067ce5b0d (HEAD -> develop, origin/develop, ticket-2904)
Author: Vu Minh Nguyen vu.m.nguyen@dektech.com.au
Date: Fri Aug 3 09:26:38 2018 +0700