[haiku-bugs] Re: [Haiku] #10229: Fixed resource leak in Terminal CID: 702031

  • From: "korli" <trac@xxxxxxxxxxxx>
  • Date: Fri, 22 Nov 2013 17:56:14 -0000

#10229: Fixed resource leak in Terminal CID: 702031
-------------------------------------+----------------------------
   Reporter:  Ezodev                 |      Owner:  jackburton
       Type:  bug                    |     Status:  new
   Priority:  normal                 |  Milestone:  R1
  Component:  Applications/Terminal  |    Version:  R1/Development
 Resolution:                         |   Keywords:  gci2013
 Blocked By:                         |   Blocking:
Has a Patch:  1                      |   Platform:  All
-------------------------------------+----------------------------

Comment (by korli):

 Once again, master is used at line 621, so there is no reason to close it
 unconditionally before that.

 Coverity said the same BTW:
 {{{
 617

 21. Condition "done <= 0", taking true branch
 618        if (done <= 0)

 CID undefined (#2 of 2): Resource leak (RESOURCE_LEAK)22. leaked_handle:
 Handle variable "master" going out of scope leaks the handle.
 619                return B_ERROR;
 }}}

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

Other related posts: