about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library/Implementation')
-rw-r--r--WWW/Library/Implementation/HTAccess.c17
-rw-r--r--WWW/Library/Implementation/HTTCP.c7
-rw-r--r--WWW/Library/Implementation/HTTP.c3
-rw-r--r--WWW/Library/Implementation/LYLeaks.h10
4 files changed, 28 insertions, 9 deletions
diff --git a/WWW/Library/Implementation/HTAccess.c b/WWW/Library/Implementation/HTAccess.c
index 4c2c1be5..0c731d1b 100644
--- a/WWW/Library/Implementation/HTAccess.c
+++ b/WWW/Library/Implementation/HTAccess.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTAccess.c,v 1.80 2016/11/24 15:29:50 tom Exp $
+ * $LynxId: HTAccess.c,v 1.81 2018/03/29 21:41:37 tom Exp $
  *
  *		Access Manager					HTAccess.c
  *		==============
@@ -1118,10 +1118,17 @@ static BOOL HTLoadDocument(const char *full_address,	/* may include #fragment */
  */
 BOOL HTLoadAbsolute(const DocAddress *docaddr)
 {
-    return HTLoadDocument(docaddr->address,
-			  HTAnchor_findAddress(docaddr),
-			  (HTOutputFormat ? HTOutputFormat : WWW_PRESENT),
-			  HTOutputStream);
+    BOOL result;
+    HTParentAnchor *anchor = HTAnchor_findAddress(docaddr);
+
+    result = HTLoadDocument(docaddr->address,
+			    anchor,
+			    (HTOutputFormat ? HTOutputFormat : WWW_PRESENT),
+			    HTOutputStream);
+    if (!result) {
+	HTAnchor_delete(anchor->parent);
+    }
+    return result;
 }
 
 #ifdef NOT_USED_CODE
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index ebcfcaef..ce014ce9 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTCP.c,v 1.143 2018/03/28 22:29:45 tom Exp $
+ * $LynxId: HTTCP.c,v 1.144 2018/03/30 00:13:21 tom Exp $
  *
  *			Generic Communication Code		HTTCP.c
  *			==========================
@@ -32,7 +32,9 @@
 #ifdef NSL_FORK
 #include <signal.h>
 #include <www_wait.h>
-#define FREE_NSL_FORK(p) FREE(p)
+#define FREE_NSL_FORK(p) { FREE(p); }
+#elif defined(_WINDOWS_NSL)
+#define FREE_NSL_FORK(p) if ((p) == gbl_phost) { FREE(p); }
 #else
 #define FREE_NSL_FORK(p)	/* nothing */
 #endif /* NSL_FORK */
@@ -1393,6 +1395,7 @@ static int HTParseInet(SockA * soc_in, const char *str)
 	if (!gbl_phost)
 	    goto failed;
 	MemCpy((void *) &soc_in->sin_addr, gbl_phost->h_addr_list[0], gbl_phost->h_length);
+	FREE(gbl_phost);
 #else /* !_WINDOWS_NSL */
 	{
 	    LYNX_HOSTENT *phost;
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index f7e19018..e2467d06 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTP.c,v 1.172 2018/03/21 21:25:11 tom Exp $
+ * $LynxId: HTTP.c,v 1.173 2018/03/30 00:56:26 tom Exp $
  *
  * HyperText Tranfer Protocol	- Client implementation		HTTP.c
  * ==========================
@@ -1280,6 +1280,7 @@ static int HTLoadHTTP(const char *arg,
 		   SSL_get_cipher(handle));
 	_HTProgress(msg);
 	FREE(msg);
+	FREE(ssl_all_cns);
     }
 #endif /* USE_SSL */
 
diff --git a/WWW/Library/Implementation/LYLeaks.h b/WWW/Library/Implementation/LYLeaks.h
index 8f616815..e75fd6da 100644
--- a/WWW/Library/Implementation/LYLeaks.h
+++ b/WWW/Library/Implementation/LYLeaks.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYLeaks.h,v 1.15 2018/03/28 09:28:18 tom Exp $
+ * $LynxId: LYLeaks.h,v 1.17 2018/03/30 00:35:10 tom Exp $
  */
 #ifndef __LYLEAKS_H
 /*
@@ -155,6 +155,11 @@ extern "C" {
 #endif				/* free */
 #define free(vp_alloced) LYLeakFree(vp_alloced, __FILE__, __LINE__)
 
+#ifdef strdup
+#undef strdup
+#endif				/* free */
+#define strdup(vp_alloced) LYLeakStrdup(vp_alloced, __FILE__, __LINE__)
+
 /*
  * Added the following two defines to track Lynx's frequent use of those
  * macros.  - KW 1997-10-12
@@ -249,6 +254,9 @@ extern "C" {
     extern void LYLeakFree(void *vp_alloced,
 			   const char *cp_File,
 			   const short ssi_Line);
+    extern char *LYLeakStrdup(const char *src,
+			      const char *cp_File,
+			      const short ssi_Line);
     extern char *LYLeakSACopy(char **dest,
 			      const char *src,
 			      const char *cp_File,