Error when deleting image after returning frame

I am running into segmentation fault / Bus error when dwImage_destroy after dwSensorCamera_returnFrame.

Workflow:

Main Loop:

while(loop) {
   	CHECK_DW_ERROR(dwSensorCamera_readFrameNew(&frame, DW_TIMEOUT, mCamera));    
        // get an image with the desired output format
        CHECK_DW_ERROR(dwSensorCamera_getImage(&mHandle_NVM, 
        DW_CAMERA_OUTPUT_NATIVE_PROCESSED, frame));  
        
//Use the NVMEDIA image
   	
        // return frame
        CHECK_DW_ERROR(dwSensorCamera_returnFrame(&frame));
}

In release

    if(mHandle_NVM){
        CHECK_DW_ERROR(dwImage_destroy(mHandle_NVM));
    }

Is the dwImage_destroy unnecessary since the underlying frame handle is returned and data associated with this handle is invalid after the handle has been returned.

Please provide the following info (check/uncheck the boxes after clicking “+ Create Topic”):
Software Version
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.5.0.7774
other

Host Machine Version
native Ubuntu 18.04
other

Hi @aswb ,

It is returned after calling dwSensorCamera_returnFrame(). Thanks.