Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#3552 closed patch (fixed)

Fix erroneous usage of free() instead of delete

Reported by: Russell Bryant <russell@…> Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: unknown
Severity: medium Keywords:
Cc: Ticket locked: no

Description

There are two arrays in libs/libmyth/jsmenu.cpp that were allocated with new, but get free'd using free() instead of delete. The results of using free() on a buffer allocated with new are undefined. The attached patch changes the two places in question to use delete, instead.

Attachments (1)

jsmenu.patch.txt (445 bytes) - added by Russell Bryant <russell@…> 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by Russell Bryant <russell@…>

Attachment: jsmenu.patch.txt added

comment:1 Changed 12 years ago by cpinkham

Resolution: fixed
Status: newclosed

(In [13563]) Replace a couple free() calls with delete [].

Closes #3552 using patch by Russell Bryant.

comment:2 Changed 12 years ago by cpinkham

(In [13565]) Meant to apply this to trunk first...

Replace a couple incorrect free() calls with delete [].

References #3552. Patch by Russell Bryant.

comment:3 Changed 12 years ago by Janne Grunau

(In [13907]) Closes #3552. fix a potential race in waitPrivRequest() by applying patch from Russell Bryant

change the declation of m_priv_mutex to non-recursive and don't allocate it on the heap

comment:4 in reply to:  3 Changed 12 years ago by Janne Grunau

Replying to janne:

(In [13907]) Closes #3552.

off by one error in commit message. should have been #3553

Note: See TracTickets for help on using tickets.