This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Potential memory leak in Buffer_copy of DMAI

Hi,

I looked at the code for Buffer_copy inside the buffer module of DMAI, and I think there could be a probleme with memory handling.

If the passed destination buffer isn't already referencing another buffer, the original *userPtr gets lost.

For example the code of the dvsdk_3_10_00_16/dvsdk_demos_3_10_00_14/dm6467/decode/display.c file. The buffer hSrcCloneBuf is created at line 440 with default attributes. Hence, memory gets allocated. After Buffer_copy at line 475 is executed old *userPtr is lost and memory can not be freed until program termination.

Is my assessment right?

Thanks,

Martin Fletzer

  • Hi Martin,

    We are investigating your report and how to best handle this issue. It's filed in the DMAI tracker and you can track it at:

    https://gforge.ti.com/gf/project/dmai/tracker/?action=TrackerItemEdit&tracker_item_id=1154&start=50

    Regards, Niclas