1
0
Fork 0

MGS-5789 [#imx-2156] Fix Coverity issue in VIP PM HW workaround

Fix resource leak issue in VIP PM HW workaround, set pointer to NULL before release funcCmd
since they point to the same memory.

Signed-off-by: Ella Feng <ella.feng@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Ella Feng 2020-06-15 19:34:41 +08:00
parent a6ff08ef2f
commit 5db279fcc5
1 changed files with 2 additions and 2 deletions

View File

@ -4279,13 +4279,13 @@ _FuncInit_FlopReset(
(gctPOINTER *)&pointer
));
Execution->funcCmd = (gcsFUNCTION_COMMAND_PTR)pointer;
gcmkONERROR(gckOS_ZeroMemory(
(gctPOINTER)pointer,
gcmSIZEOF(gcsFUNCTION_COMMAND) * Execution->funcCmdCount
));
Execution->funcCmd = (gcsFUNCTION_COMMAND_PTR)pointer;
pool = gcvPOOL_DEFAULT;
#if gcdENABLE_CACHEABLE_COMMAND_BUFFER