[haiku-commits] Re: r40762 - haiku/trunk/src/apps/terminal

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 02 Mar 2011 10:04:17 +0100

On 2011-03-01 at 19:00:28 [+0100], kallisti5@xxxxxxxxxxx wrote:
> Author: kallisti5
> Date: 2011-03-01 19:00:28 +0100 (Tue, 01 Mar 2011)
> New Revision: 40762
> Changeset: http://dev.haiku-os.org/changeset/40762
> 
> Modified:
>    haiku/trunk/src/apps/terminal/TerminalRoster.cpp
> Log:
> remove a double free of fOurInfo. CID 10563
> 
> Modified: haiku/trunk/src/apps/terminal/TerminalRoster.cpp
> ===================================================================
> --- haiku/trunk/src/apps/terminal/TerminalRoster.cpp    2011-03-01 16:19:38 
> UTC (rev 40761)
> +++ haiku/trunk/src/apps/terminal/TerminalRoster.cpp    2011-03-01 18:00:28 
> UTC (rev 40762)
> @@ -257,7 +257,6 @@
>  
>      // remove our info and update the clipboard
>      fInfos.RemoveItem(fOurInfo);
> -    delete fOurInfo;
>      fOurInfo = NULL;
>  
>      _UpdateClipboard();

Am I the only one thinking that the BObjectList::RemoveItem() deleteIfOwning 
parameter should not have a default? I find the current situation rather 
inconsistent with RemoveItemAt() which doesn't have such a parameter and 
doesn't delete the object either.

CU, Ingo

Other related posts: