Opened 5 months ago
Closed 5 months ago
Last modified 5 months ago
Patch to free hdhomerun device memory after use - Fixes Coverity 700660 700661 700662
|Reported by:||Gary Buhrmaster <gary.buhrmaster@…>||Owned by:||Gary Buhrmaster <gary.buhrmaster@…>|
|Component:||MythTV - General||Version:||Master Head|
Static analysis detected a memory leak in cardutil.cpp after allocating a new hdhomerun_device, and it was not freed before returning.
This patch calls the hdhomerun_device_destroy function to free the storage.
It is possible that Coverity will not recognize the hdhomerun_device_destroy will free the memory, in which case one will need to manually acknowledge the Coverity issue. But the memory leak is real without the patch.
github ref: https://github.com/garybuhrmaster/mythtv/commit/ab1e04b6f50149ec81329d1e75846a5afdb0fd4e
github git-am ref: https://github.com/garybuhrmaster/mythtv/commit/ab1e04b6f50149ec81329d1e75846a5afdb0fd4e.patch