Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gcl (2.6.10-4) unstable; urgency=high
 .
   * 2.6.11pre test 3
   * Bug fix: "debian/rules uses DEB_BUILD_* macros instead of DEB_HOST_*
     macros", thanks to Matthias Klose (Closes: #743520).
Author: Camm Maguire <camm@debian.org>
Bug-Debian: http://bugs.debian.org/743520

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- gcl-2.6.10.orig/o/alloc.c
+++ gcl-2.6.10/o/alloc.c
@@ -1665,7 +1665,7 @@ free(void *ptr)
 #ifdef NOFREE_ERR
 	return ;
 #else	
-	if (raw_image==FALSE || core_end-heap_end<sizeof(ptr) || ptr!=*(void **)heap_end) {
+	if (!saving_system || core_end-heap_end<sizeof(ptr) || ptr!=*(void **)heap_end) {
 	  static void *old_ptr;
 	  if (old_ptr==ptr) return;
 	  old_ptr=ptr;
--- gcl-2.6.10.orig/o/save.c
+++ gcl-2.6.10/o/save.c
@@ -35,9 +35,9 @@ LFD(Lsave)(void) {
   cs_org=0;
 
 #ifdef MEMORY_SAVE
-    MEMORY_SAVE(kcl_self,filename);
+  MEMORY_SAVE(kcl_self,filename);
 #else	  
-    memory_save(kcl_self, filename);
+  memory_save(kcl_self, filename);
 #endif	
 
   /*  no return  */
