Index: trunk/src/sh_hash.c
===================================================================
--- trunk/src/sh_hash.c	(revision 212)
+++ trunk/src/sh_hash.c	(revision 227)
@@ -1338,4 +1338,6 @@
 	  --sig_raised; --sig_urgent;
 	  retval = 1; exitval = EXIT_SUCCESS;
+	  SH_FREE(line);
+	  line = NULL;
 	  goto unlock_and_return;
 	}
@@ -2173,39 +2175,39 @@
 		      unsigned char * str, int size)
 {
-  file_type   tmpFile;
   int         i = 0;
   char      * p;
   char        i2h[2];
-
-  tmpFile.attr_string = NULL;
-  tmpFile.link_path   = NULL;
-
-  sl_strlcpy(tmpFile.fullpath, key, PATH_MAX);
-  tmpFile.size  = val1;
-  tmpFile.mtime = val2;
-  tmpFile.ctime = val3;
-
-  tmpFile.atime = 0;
-  tmpFile.mode  = 0;
-  tmpFile.owner = 0;
-  tmpFile.group = 0;
-  sl_strlcpy(tmpFile.c_owner, _("root"), 5);
-  sl_strlcpy(tmpFile.c_group, _("root"), 5);
+  file_type * tmpFile = SH_ALLOC(sizeof(file_type));
+
+  tmpFile->attr_string = NULL;
+  tmpFile->link_path   = NULL;
+
+  sl_strlcpy(tmpFile->fullpath, key, PATH_MAX);
+  tmpFile->size  = val1;
+  tmpFile->mtime = val2;
+  tmpFile->ctime = val3;
+
+  tmpFile->atime = 0;
+  tmpFile->mode  = 0;
+  tmpFile->owner = 0;
+  tmpFile->group = 0;
+  sl_strlcpy(tmpFile->c_owner, _("root"), 5);
+  sl_strlcpy(tmpFile->c_group, _("root"), 5);
 
   if ((str != NULL) && (size < (PATH_MAX/2)-1))
     {
-      tmpFile.c_mode[0] = 'l';  
-      tmpFile.c_mode[1] = 'r'; tmpFile.c_mode[2]  = 'w';
-      tmpFile.c_mode[3] = 'x'; tmpFile.c_mode[4]  = 'r'; 
-      tmpFile.c_mode[5] = 'w'; tmpFile.c_mode[6]  = 'x'; 
-      tmpFile.c_mode[7] = 'r'; tmpFile.c_mode[8]  = 'w'; 
-      tmpFile.c_mode[9] = 'x'; tmpFile.c_mode[10] = '\0';
-      tmpFile.link_path = SH_ALLOC((size * 2) + 2);
+      tmpFile->c_mode[0] = 'l';  
+      tmpFile->c_mode[1] = 'r'; tmpFile->c_mode[2]  = 'w';
+      tmpFile->c_mode[3] = 'x'; tmpFile->c_mode[4]  = 'r'; 
+      tmpFile->c_mode[5] = 'w'; tmpFile->c_mode[6]  = 'x'; 
+      tmpFile->c_mode[7] = 'r'; tmpFile->c_mode[8]  = 'w'; 
+      tmpFile->c_mode[9] = 'x'; tmpFile->c_mode[10] = '\0';
+      tmpFile->link_path = SH_ALLOC((size * 2) + 2);
       for (i = 0; i < size; ++i)
 	{
 	  p = sh_util_charhex (str[i],i2h);
-	  tmpFile.link_path[2*i]   = p[0];
-	  tmpFile.link_path[2*i+1] = p[1];
-	  tmpFile.link_path[2*i+2] = '\0';
+	  tmpFile->link_path[2*i]   = p[0];
+	  tmpFile->link_path[2*i+1] = p[1];
+	  tmpFile->link_path[2*i+2] = '\0';
 	}
     }
@@ -2213,16 +2215,17 @@
     {
       for (i = 0; i < 10; ++i) 
-	tmpFile.c_mode[i] = '-';
-      tmpFile.c_mode[10] = '\0';
-      tmpFile.link_path = sh_util_strdup("-");
+	tmpFile->c_mode[i] = '-';
+      tmpFile->c_mode[10] = '\0';
+      tmpFile->link_path = sh_util_strdup("-");
     }
 
   if (sh.flag.checkSum == SH_CHECK_CHECK && 
       sh.flag.update == S_TRUE)
-    sh_hash_pushdata_memory (&tmpFile, SH_KEY_NULL);
-  else
-    sh_hash_pushdata (&tmpFile, SH_KEY_NULL);
-
-  if (tmpFile.link_path) SH_FREE(tmpFile.link_path);
+    sh_hash_pushdata_memory (tmpFile, SH_KEY_NULL);
+  else
+    sh_hash_pushdata (tmpFile, SH_KEY_NULL);
+
+  if (tmpFile->link_path) SH_FREE(tmpFile->link_path);
+  SH_FREE(tmpFile);
   return;
 }
@@ -2234,24 +2237,24 @@
 		       int * size)
 {
-  file_type   tmpFile;
   size_t      len;
   char      * p;
   int         i;
   char      * retval = NULL;
+  file_type * tmpFile = SH_ALLOC(sizeof(file_type));
   
   *size = 0;
 
-  if (0 == sh_hash_get_it (key, &tmpFile))
-    {
-      *val1 = tmpFile.size;
-      *val2 = tmpFile.mtime;
-      *val3 = tmpFile.ctime;
-
-      if (tmpFile.link_path && tmpFile.link_path[0] != '-')
-	{
-	  len = strlen(tmpFile.link_path);
+  if (0 == sh_hash_get_it (key, tmpFile))
+    {
+      *val1 = tmpFile->size;
+      *val2 = tmpFile->mtime;
+      *val3 = tmpFile->ctime;
+
+      if (tmpFile->link_path && tmpFile->link_path[0] != '-')
+	{
+	  len = strlen(tmpFile->link_path);
 
 	  p = SH_ALLOC((len/2)+1);
-	  i = sh_util_hextobinary (p, tmpFile.link_path, len);
+	  i = sh_util_hextobinary (p, tmpFile->link_path, len);
 
 	  if (i == 0)
@@ -2279,5 +2282,6 @@
       *val3 =  0;
     }
-  if (tmpFile.link_path) SH_FREE(tmpFile.link_path);
+  if (tmpFile->link_path) SH_FREE(tmpFile->link_path);
+  SH_FREE(tmpFile);
   return retval;
 }
@@ -3990,4 +3994,5 @@
       decompressed[clen] = '\0';
       fputs( (char*) decompressed, stdout);
+      SH_FREE(decompressed);
       return 0;
     }
