Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11669 closed Patch - Bug Fix (fixed)

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@…>
Priority: minor Milestone: 0.27
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

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

Change History (2)

comment:1 Changed 11 years ago by Gary Buhrmaster <gary.buhrmaster@…>

Owner: set to Gary Buhrmaster <gary.buhrmaster@…>
Resolution: fixed
Status: newclosed

In 3d649d55749fae4e8b534dc9e3565ec5dafe4004/mythtv:

Free hdhomerun device after use - fixes memory leak

The codes created the hdhr device, but did not
release the storage after use resulting in a
memory leak.

Fixes Coverity 700660 700661 700662

Fixes #11669.

Signed-off-by: Paul Harrison <pharrison@…>

comment:2 Changed 11 years ago by paulh

Milestone: unknown0.27
Note: See TracTickets for help on using tickets.