Git development
 help / color / mirror / Atom feed
From: Martin Schlemmer <azarah@nosferatu.za.org>
To: Petr Baudis <pasky@ucw.cz>
Cc: GIT Mailing Lists <git@vger.kernel.org>
Subject: Re: Plug memory leak in update-cache.c
Date: Sat, 16 Apr 2005 02:00:21 +0200	[thread overview]
Message-ID: <1113609621.8582.12.camel@nosferatu.lan> (raw)
In-Reply-To: <20050415234807.GS7417@pasky.ji.cz>

[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]

On Sat, 2005-04-16 at 01:48 +0200, Petr Baudis wrote:
> Dear diary, on Thu, Apr 14, 2005 at 10:53:50AM CEST, I got a letter
> where Martin Schlemmer <azarah@nosferatu.za.org> told me that...
> > Hi,
> > 
> > Might not be that an big an issue as it should be freed on exit, but
> > might cause problems with big trees.
> > 
> > ----
> > 
> > Plug memory leak in update-cache.c.
> > 
> > Signed-off-by: Martin Schlemmer <azarah@nosferatu.za.org>
> > 
> > update-cache.c:  22f3ccd47db4f0888901109a8cbf883d272d1cba
> > --- 22f3ccd47db4f0888901109a8cbf883d272d1cba/update-cache.c
> > +++ uncommitted/update-cache.c
> > @@ -202,6 +202,7 @@
> >                         printf("%s: needs update\n", ce->name);
> >                         continue;
> >                 }
> > +               free(active_cache[i]);
> >                 active_cache[i] = new;
> >         }
> >  }
> 
> FYI, new could've contained active_cache[i] at that time, so you needed
> to check for that. Fixed though, thanks for pointing it out.
> 

Urk, no, please drop.  As Ingo pointed out, the memory was obtained via
mmap ...


-- 
Martin Schlemmer


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2005-04-15 23:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-14  8:53 Plug memory leak in update-cache.c Martin Schlemmer
2005-04-15 23:48 ` Petr Baudis
2005-04-16  0:00   ` Martin Schlemmer [this message]
2005-04-16  0:04     ` Petr Baudis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1113609621.8582.12.camel@nosferatu.lan \
    --to=azarah@nosferatu.za.org \
    --cc=git@vger.kernel.org \
    --cc=pasky@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox