about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2018-03-28 20:09:55 +0000
committerThomas E. Dickey <dickey@invisible-island.net>2018-03-28 20:09:55 +0000
commitd59cf1e795c0628c2f8b4dce3052627ecdad20a8 (patch)
treead17d02b75aaa503f3236158302abd3ca4e97ab4
parentcbb0a18855d2ee57d2ad8e9de2502969a27d90fc (diff)
downloadlynx-snapshots-d59cf1e795c0628c2f8b4dce3052627ecdad20a8.tar.gz
snapshot of project "lynx", label v2-8-9dev_17c
-rw-r--r--CHANGES6
-rw-r--r--WWW/Library/Implementation/HTFTP.c7
-rw-r--r--WWW/Library/Implementation/LYLeaks.h6
-rw-r--r--src/LYLeaks.c4
-rw-r--r--src/LYMain.c7
5 files changed, 22 insertions, 8 deletions
diff --git a/CHANGES b/CHANGES
index 47de75aa..c4fb2bc1 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,11 @@
--- $LynxId: CHANGES,v 1.966 2018/03/28 00:52:30 tom Exp $
+-- $LynxId: CHANGES,v 1.968 2018/03/28 20:09:55 tom Exp $
 ===============================================================================
 Changes since Lynx 2.8 release
 ===============================================================================
 
-2018-03-27 (2.8.9dev.18)
+2018-03-28 (2.8.9dev.18)
+* put Lynx.leaks file in home directory like Lynx.trace (report by GV) -TD
+* fix a memory leak in HTFTP.c -GV
 * modify HTDoConnect(), adding a check for keyboard interrupt with 'z' in the
   select-loop -TD
 * modify legacy feature from Lynx 2.7.2 which checks the hostname of a URI
diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c
index 937bf263..63c8d780 100644
--- a/WWW/Library/Implementation/HTFTP.c
+++ b/WWW/Library/Implementation/HTFTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFTP.c,v 1.131 2018/03/11 22:30:30 tom Exp $
+ * $LynxId: HTFTP.c,v 1.132 2018/03/28 08:51:10 Gisle.Vanem Exp $
  *
  *			File Transfer Protocol (FTP) Client
  *			for a WorldWideWeb browser
@@ -1470,6 +1470,11 @@ typedef struct _EntryInfo {
 static void free_entryinfo_struct_contents(EntryInfo *entry_info)
 {
     if (entry_info) {
+#ifdef LONG_LIST
+	FREE(entry_info->file_mode);
+	FREE(entry_info->file_user);
+	FREE(entry_info->file_group);
+#endif
 	FREE(entry_info->filename);
 	FREE(entry_info->linkname);
 	FREE(entry_info->type);
diff --git a/WWW/Library/Implementation/LYLeaks.h b/WWW/Library/Implementation/LYLeaks.h
index b3672734..8f616815 100644
--- a/WWW/Library/Implementation/LYLeaks.h
+++ b/WWW/Library/Implementation/LYLeaks.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYLeaks.h,v 1.14 2012/02/10 00:15:56 tom Exp $
+ * $LynxId: LYLeaks.h,v 1.15 2018/03/28 09:28:18 tom Exp $
  */
 #ifndef __LYLEAKS_H
 /*
@@ -77,7 +77,8 @@ extern "C" {
 #endif				/* VMS */
 /*
  * Data structures
- */ typedef struct SourceLocation_tag {
+ */
+    typedef struct SourceLocation_tag {
 	/*
 	 * The file name and line number of where an event took place.
 	 */
@@ -119,6 +120,7 @@ extern "C" {
 /*
  *  Global variable declarations
  */
+    extern char LYLeaksPath[];
 
 /*
  *  Macros
diff --git a/src/LYLeaks.c b/src/LYLeaks.c
index d1bdaf97..52b86b91 100644
--- a/src/LYLeaks.c
+++ b/src/LYLeaks.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYLeaks.c,v 1.38 2016/11/24 15:35:29 tom Exp $
+ * $LynxId: LYLeaks.c,v 1.39 2018/03/28 09:28:32 tom Exp $
  *
  *	Copyright (c) 1994, University of Kansas, All Rights Reserved
  *	(this file was rewritten twice - 1998/1999 and 2003/2004)
@@ -197,7 +197,7 @@ void LYLeaks(void)
      * Open the leakage sink to take all the output.  Recreate the file each
      * time.  Do nothing if unable to open the file.
      */
-    Fp_leakagesink = LYNewTxtFile(LEAKAGE_SINK);
+    Fp_leakagesink = LYNewTxtFile(LYLeaksPath);
     if (Fp_leakagesink == NULL) {
 	return;
     }
diff --git a/src/LYMain.c b/src/LYMain.c
index 2eb3c59e..bccb6e47 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYMain.c,v 1.276 2018/03/27 23:05:51 tom Exp $
+ * $LynxId: LYMain.c,v 1.277 2018/03/28 20:07:59 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTTP.h>
@@ -571,6 +571,10 @@ FILE *LYTraceLogFP = NULL;	/* Pointer for TRACE log  */
 char *LYTraceLogPath = NULL;	/* Path for TRACE log      */
 BOOLEAN LYUseTraceLog = USE_TRACE_LOG;	/* Use a TRACE log?        */
 
+#ifdef LY_FIND_LEAKS
+char LYLeaksPath[LY_MAXPATH];
+#endif
+
 BOOLEAN LYSeekFragMAPinCur = TRUE;
 BOOLEAN LYSeekFragAREAinCur = TRUE;
 BOOLEAN LYStripDotDotURLs = TRUE;	/* Try to fix ../ in some URLs? */
@@ -1039,6 +1043,7 @@ int main(int argc,
 #endif
 
 #ifdef LY_FIND_LEAKS
+    LYAddPathToHome(LYLeaksPath, (size_t) LY_MAXPATH, LEAKAGE_SINK);
     /*
      * Register the final function to be executed when being exited.  Will
      * display memory leaks if the -find-leaks option is used.  This should