about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/LYLeaks.c4
-rw-r--r--src/LYMain.c7
2 files changed, 8 insertions, 3 deletions
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