Opened 16 years ago

Closed 15 years ago

#5289 closed defect (fixed)

SIScan::UpdateSDTinDB can leak desc or segfault because of a given pointer

Reported by: Erik Hovland <erik@…> Owned by: danielk
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no


The pointer desc in UpdateSDTinDB could be allocated by the function it is retrieve from (GetServiceDescriptor?()). Then it could be leaked if certain failure paths are followed. Also because it is not always checked for null, it could segfault when dereferenced and is null.

The patch used an std::auto_ptr to manage desc instead and adds any necessary checks for null.

Attachments (1)

libs_libmythtv_siscan.cpp-use-auto_ptr-to-suppress-leaks.patch (2.5 KB) - added by Erik Hovland <erik@…> 16 years ago.
Uses auto_ptr to manage the desc pointer

Download all attachments as: .zip

Change History (3)

Changed 16 years ago by Erik Hovland <erik@…>

Uses auto_ptr to manage the desc pointer

comment:1 Changed 16 years ago by danielk

Owner: changed from Isaac Richards to danielk
Status: newassigned

comment:2 Changed 15 years ago by danielk

Resolution: fixed
Status: assignedclosed

(In [17544]) Fixes #5289. Fixes a memory leak that can occur during DVB channel scanning.

Note: See TracTickets for help on using tickets.