Fixed diskusage_applet memory hole in CVS (was Re: Memory hole in diskusage_applet)



-----BEGIN PGP SIGNED MESSAGE-----

[This Mail is Cc to all people complaining about the memory leak in the
 diskusage_applet in the last two or three weeks - hope I did not forget
 anyone].

Hi,

I just fixed the memory leak of the diskusage applet in CVS.

Martin

[To the guys who worked on it this week:]

Could you perhaps fetch the latest source from CVS and check this again
to be sure.

Thanks.

[To Colin Walters:]

You seem to have discovered the problem this week - could you perhaps
fetch the latest source from CVS (AnonCVS seems to be up again) and try
it again to be sure - I had no time to compile all the Gnome stuff just
to test this.

Thanks.

[This is the patch:]

diff -u -r1.5 -r1.6
- --- diskusage_read.c    1998/06/02 22:09:17     1.5
+++ diskusage_read.c    1998/07/06 23:44:52     1.6
@@ -95,6 +95,12 @@
        while (me) {
                mount_list = me;
                me = me->me_next;
+               if(mount_list->me_devname)
+                       free(mount_list->me_devname);
+               if(mount_list->me_mountdir)
+                       free(mount_list->me_mountdir);
+               if(mount_list->me_type)
+                       free(mount_list->me_type);
                free(mount_list);
        }

On Mon, 6 Jul 1998, Martin Baulig wrote:

> To: Colin Walters <levanti@yahoo.com>
> Subject: Re: Memory hole in diskusage_applet
> From: Martin Baulig <martin@home-of-linux.org>
> 
> X-Premail-Auth: Good signature from user "Martin Baulig
>    <baulig@sonne.uni-trier.de>".
> 
> On Mon, 6 Jul 1998, Colin Walters wrote:
> 
> > To: gnome-list@gnome.org
> > Subject: Memory hole in diskusage_applet
> > From: Colin Walters <levanti@yahoo.com>
> >
> > I had panel running with the diskusage_applet for about 10 days.  At
> > the end of that time the diskusage_applet was using 50 megs of ram.
> > If it's any help in tracking down the bug, I changed the "free space"
> > color from green to blue, but that's about it.
> 
> I know about that. I wanted to fix this about two weeks ago but I did not
> yet have time for it. I'm getting holidays in two weeks and then I'll look
> at this.
> 
> If someone wants to fix it in the meantime: it's because the memory
> allocated in mountlist.c (?) isn't freed again.
> 
> Martin
> 
> >
> >
> >
> >
> >
> > ==
> > levanti
> > levanti@geocities.com
> >
> > "Intertwingularity is not generally acknowledged;
> > People keep pretending they can make things deeply hierarchical,
> > categorizable and sequential when they can't. Everything is
> > deeply intertwingled.''
> > _________________________________________________________
> > DO YOU YAHOO!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> >          To unsubscribe: mail gnome-list-request@gnome.org with
> >                        "unsubscribe" as the Subject.
> >
> 
> -----------------------------------------------------------------
>    Martin Baulig - Angewandte Mathematik - Universitaet Trier
> 
>    baulig@castor.uni-trier.de, http://www.home-of-linux.org/
>    Key: 1024-bit key with ID C8178435 created 1997/01/24
>    ID:  67 C1 84 A0 47 F5 11 C5  5F 68 4C 84 99 05 C3 92
>    Finger me for public key or fetch finger.txt from the url above
> ------------------------------------------------------------------
> 
> 

- -----------------------------------------------------------------
   Martin Baulig - Angewandte Mathematik - Universitaet Trier

   baulig@castor.uni-trier.de, http://www.home-of-linux.org/
   Key: 1024-bit key with ID C8178435 created 1997/01/24 
   ID:  67 C1 84 A0 47 F5 11 C5  5F 68 4C 84 99 05 C3 92
   Finger me for public key or fetch finger.txt from the url above
- ------------------------------------------------------------------


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQCVAwUBNaFmL4A8K7jIF4Q1AQFYWAP9GNCTcp1UX4wYws6F/C8xgcIIMT7jigGC
OrTtoiD8AXoRDZlGzdtt5DVpwA47XB7PuHt06YAhCPsioWR8EXDSQYFeGAn+rxQL
2GWYWdQsi1RyX/JvUo+I0ZiyDYsfL2eXCo16CXe/FOtKXRYqXynbFuCyFmPicnnl
v58C5dxWbMI=
=OFnz
-----END PGP SIGNATURE-----



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]