bugGNU Screen - Bugs: bug #16483, Memory Leak in FreeAltScreen

 
 

bug #16483: Memory Leak in FreeAltScreen

Submitter:  None
Submitted:  Tue 02 May 2006 09:52:17 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  None
Fixed Release:  None Planned Release:  None
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

  Spam posted by anonymous
  Spam posted by anonymous
Tue 02 May 2006 12:22:51 PM UTC, comment #1: 

Applied (free calls moved into the "if").
Thanks!

Michael Schröder <mls>
Group administrator
Tue 02 May 2006 09:52:17 AM UTC, original submission:  

From: "Daniel De Graaf" <danieldegraaf@gmail.com>
To: "Screen development" <screen-devel@gnu.org>
Subject: Re: [screen-devel] Memory Leak in FreeAltScreen
Date: Mon, 1 May 2006 18:34:29 -0500
Sender: screen-devel-bounces+jw=cs.fau.de@gnu.org

[-- Attachment #1 --]
[-- Type: text/plain, Encoding: base64, Size: 1.0K --]

The free() is still needed; FreeMline() just frees the structures
referenced by p->w_alt_hlines, not p->w_alt_hlines itself. Run under
valgrind with and without the free()s, and switch to the altscreen a
few times to see.

- Daniel De Graaf

On 5/1/06, Eric Wald <eswald@gmail.com> wrote:

>Daniel De Graaf wrote:
>>    if (p->w_alt_mlines)
>>      for (i = 0; i < p->w_alt_height; i++)
>>        FreeMline(p->w_alt_mlines + i);
>> +  free(p->w_alt_mlines);
>> [...]
>>    if (p->w_alt_hlines)
>>      for (i = 0; i < p->w_alt_histheight; i++)
>>        FreeMline(p->w_alt_hlines + i);
>> +  free(p->w_alt_hlines);
>
>It seems to me that the FreeMline() calls make the free() calls redundant.
>Am I wrong?
>
>- Eric


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by micahcowan (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-07-09 None Attached File- Added powered_php_80x15.png, #16073
    2008-06-15 micahcowan Open/ClosedOpen Closed
    2006-05-02 mls StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code