[haiku-bugs] Re: [Haiku] #10232: Minor memory leak fix in media kit ParameterWeb

  • From: "anevilyak" <trac@xxxxxxxxxxxx>
  • Date: Fri, 22 Nov 2013 16:20:48 -0000

#10232: Minor memory leak fix in media kit ParameterWeb
   Reporter:  Ceann           |      Owner:  axeld
       Type:  bug             |     Status:  new
   Priority:  normal          |  Milestone:  R1
  Component:  Kits/Media Kit  |    Version:  R1/Development
 Resolution:                  |   Keywords:  gci2013
 Blocked By:                  |   Blocking:
Has a Patch:  1               |   Platform:  All

Comment (by anevilyak):

 While this is correct as far as the CID is concerned, it's not entirely
 complete: in the case where {{{ fValues->AddItem() }}} succeeds, but {{{
 fSelections->AddItem() }}} fails, it should remove the value, and free it
 in addition to {{{ nameCopy }}}. Otherwise, the state of the parameter
 object will be inconsistent after the call returns. Coverity won't detect
 that though, since the added value will ultimately be freed by the
 destructor either way.

Ticket URL: <http://dev.haiku-os.org/ticket/10232#comment:3>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: