aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-10-09 11:12:34 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-10-09 11:12:34 +0000
commit0f8facb49b45a711fa7832c68260a5b45b362922 (patch)
tree877fa9fabaeb601098cdbb04e48947e34100d8a4
parentd49d05bce603313d71f1a2b9904c74ca7b368703 (diff)
added memory debugging include file
-rw-r--r--lib/base64.c5
-rw-r--r--lib/cookie.c6
-rw-r--r--lib/escape.c5
-rw-r--r--lib/formdata.c5
-rw-r--r--lib/ftp.c6
-rw-r--r--lib/getenv.c4
-rw-r--r--lib/highlevel.c5
-rw-r--r--lib/hostip.c5
-rw-r--r--lib/http.c5
-rw-r--r--lib/krb4.c5
-rw-r--r--lib/mprintf.c4
-rw-r--r--lib/security.c4
-rw-r--r--lib/sendf.c4
-rw-r--r--lib/url.c4
14 files changed, 66 insertions, 1 deletions
diff --git a/lib/base64.c b/lib/base64.c
index c67650eb3..16423e6d2 100644
--- a/lib/base64.c
+++ b/lib/base64.c
@@ -38,6 +38,11 @@
#include <string.h>
#include "base64.h"
+/* The last #include file should be: */
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
+
static char base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static int pos(char c)
diff --git a/lib/cookie.c b/lib/cookie.c
index 01c3f2d2f..a39ff88ad 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -65,6 +65,11 @@ Example set of cookies:
#include "getdate.h"
#include "strequal.h"
+/* The last #include file should be: */
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
+
/****************************************************************************
*
* cookie_add()
@@ -496,6 +501,7 @@ void cookie_cleanup(struct CookieInfo *c)
free(co);
co = next;
}
+ free(c); /* free the base struct as well */
}
}
diff --git a/lib/escape.c b/lib/escape.c
index c728b80f8..048fd0f99 100644
--- a/lib/escape.c
+++ b/lib/escape.c
@@ -48,6 +48,11 @@
#include <stdlib.h>
#include <string.h>
+/* The last #include file should be: */
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
+
char *curl_escape(char *string)
{
int alloc=strlen(string)+1;
diff --git a/lib/formdata.c b/lib/formdata.c
index 625b84ff3..11d459382 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -63,6 +63,11 @@
#include "strequal.h"
+/* The last #include file should be: */
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
+
/* Length of the random boundary string. The risk of this being used
in binary data is very close to zero, 64^32 makes
6277101735386680763835789423207666416102355444464034512896
diff --git a/lib/ftp.c b/lib/ftp.c
index 174c41e3e..920185e7e 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -89,6 +89,10 @@
#ifdef KRB4
#include "security.h"
#endif
+/* The last #include file should be: */
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
/* returns last node in linked list */
static struct curl_slist *slist_get_last(struct curl_slist *list)
@@ -1178,7 +1182,7 @@ CURLcode _ftp(struct connectdata *conn)
else {
/* Set type to binary (unless specified ASCII) */
ftpsendf(data->firstsocket, conn, "TYPE %s",
- (data->bits.ftp_list_only)?"A":"I");
+ (data->bits.ftp_ascii)?"A":"I");
nread = GetLastResponse(data->firstsocket, buf, conn);
if(nread < 0)
diff --git a/lib/getenv.c b/lib/getenv.c
index b4b2142c9..cb2ae3036 100644
--- a/lib/getenv.c
+++ b/lib/getenv.c
@@ -45,6 +45,10 @@
#include <windows.h>
#endif
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
+
char *GetEnv(char *variable)
{
#ifdef WIN32
diff --git a/lib/highlevel.c b/lib/highlevel.c
index 3e5403034..b290d9ff6 100644
--- a/lib/highlevel.c
+++ b/lib/highlevel.c
@@ -111,6 +111,11 @@
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>
+/* The last #include file should be: */
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
+
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
diff --git a/lib/hostip.c b/lib/hostip.c
index 3d43825ba..d89d95255 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -72,6 +72,11 @@
#include "inet_ntoa_r.h"
#endif
+/* The last #include file should be: */
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
+
/* --- resolve name or IP-number --- */
char *MakeIP(unsigned long num,char *addr, int addr_len)
diff --git a/lib/http.c b/lib/http.c
index 4b9da418b..6c247792c 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -117,6 +117,11 @@
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>
+/* The last #include file should be: */
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
+
/*
* This function checks the linked list of custom HTTP headers for a particular
* header (prefix).
diff --git a/lib/krb4.c b/lib/krb4.c
index d573294bd..073ba4cc0 100644
--- a/lib/krb4.c
+++ b/lib/krb4.c
@@ -47,6 +47,11 @@
#include <string.h>
#include <krb.h>
+/* The last #include file should be: */
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
+
#ifdef FTP_SERVER
#define LOCAL_ADDR ctrl_addr
#define REMOTE_ADDR his_addr
diff --git a/lib/mprintf.c b/lib/mprintf.c
index 237a21a9d..7ccbcbf81 100644
--- a/lib/mprintf.c
+++ b/lib/mprintf.c
@@ -98,6 +98,10 @@ static const char rcsid[] = "@(#)$Id$";
#include <ctype.h>
#include <string.h>
+/* The last #include file should be: */
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
#define BUFFSIZE 256 /* buffer for long-to-str and float-to-str calcs */
#define MAX_PARAMETERS 128 /* lame static limit */
diff --git a/lib/security.c b/lib/security.c
index 20a77f172..47b134159 100644
--- a/lib/security.c
+++ b/lib/security.c
@@ -47,6 +47,10 @@
#include <string.h>
#include <netdb.h>
#include "base64.h"
+/* The last #include file should be: */
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
#define min(a, b) ((a) < (b) ? (a) : (b))
diff --git a/lib/sendf.c b/lib/sendf.c
index 723acc481..dcb8cf74a 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -61,6 +61,10 @@
#include "security.h"
#include <string.h>
#endif
+/* The last #include file should be: */
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
/* infof() is for info message along the way */
diff --git a/lib/url.c b/lib/url.c
index 640b8597a..822f14e12 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -126,6 +126,10 @@
#ifdef KRB4
#include "security.h"
#endif
+/* The last #include file should be: */
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
/* -- -- */