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

gEDA-cvs: pcb.git: branch: master updated (466b0183758ef3ca44623c43de60a233b175d2ad)



The branch, master has been updated
       via  466b0183758ef3ca44623c43de60a233b175d2ad (commit)
      from  4e22cf4e48f4eb9e0a199c65cded32e15dea420d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 src/misc.c  |    6 ++++++
 src/mymem.c |    3 +++
 2 files changed, 9 insertions(+), 0 deletions(-)


=================
 Commit Messages
=================

commit 466b0183758ef3ca44623c43de60a233b175d2ad
Author: Stephen Ecob <silicon.on.inspiration@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Fixed some memory leaks associated with the global PCB structure.

:100644 100644 faeefa8... 76b05c0... M	src/misc.c
:100644 100644 bed0f9b... 59f8f8d... M	src/mymem.c

=========
 Changes
=========

commit 466b0183758ef3ca44623c43de60a233b175d2ad
Author: Stephen Ecob <silicon.on.inspiration@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Fixed some memory leaks associated with the global PCB structure.

diff --git a/src/misc.c b/src/misc.c
index faeefa8..76b05c0 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -888,6 +888,12 @@ QuitApplication (void)
   else
     DisableEmergencySave ();
 
+  /* Free up memory allocated to the PCB. Why bother when we're about to exit ?
+   * Because it removes some false positives from heap bug detectors such as
+   * lib dmalloc.
+   */
+  FreePCBMemory(PCB);
+
   exit (0);
 }
 
diff --git a/src/mymem.c b/src/mymem.c
index bed0f9b..59f8f8d 100644
--- a/src/mymem.c
+++ b/src/mymem.c
@@ -923,11 +923,14 @@ FreeDataMemory (DataTypePtr Data)
 	MYFREE (via->Name);
       }
       END_LOOP;
+      MYFREE (Data->Via);
       ELEMENT_LOOP (Data);
       {
 	FreeElementMemory (element);
       }
       END_LOOP;
+      MYFREE (Data->Element);
+      MYFREE (Data->Rat);
 
       for (layer = Data->Layer, i = 0; i < MAX_LAYER + 2; layer++, i++)
 	{




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs