]> granicus.if.org Git - curl/commitdiff
added memory debugging include file
authorDaniel Stenberg <daniel@haxx.se>
Mon, 9 Oct 2000 11:12:34 +0000 (11:12 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 9 Oct 2000 11:12:34 +0000 (11:12 +0000)
14 files changed:
lib/base64.c
lib/cookie.c
lib/escape.c
lib/formdata.c
lib/ftp.c
lib/getenv.c
lib/highlevel.c
lib/hostip.c
lib/http.c
lib/krb4.c
lib/mprintf.c
lib/security.c
lib/sendf.c
lib/url.c

index c67650eb340ce39c5e1e7a2cb00428a2da13409b..16423e6d2028f1f0263d8957390f43fa9f207490 100644 (file)
 #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)
index 01c3f2d2f48bdc4a118a7eca868e1a12a7713c70..a39ff88adb8b5f1530ba73070762c08c90d43f32 100644 (file)
@@ -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 */
    }
 }
 
index c728b80f8e8d92f5aeba860b9427af48d0a09498..048fd0f997910883f4ac51bd02a59fdb42a61c65 100644 (file)
 #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;
index 625b84ff3fca0aa53582fb82e80470efc6ab7170..11d459382bd471ccc8c8a29f11cd0b3bb0bd0ceb 100644 (file)
 
 #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
index 174c41e3e4702c25002543f7d47f282103444f85..920185e7e7e0a95aa01870c7d72114e3372702cf 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
 #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)
index b4b2142c9220838b271f1ecf1ccc27df7b47bd95..cb2ae3036ab3b43d49bf02c618aca833d49204c1 100644 (file)
 #include <windows.h>
 #endif
 
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
+
 char *GetEnv(char *variable)
 {
 #ifdef WIN32
index 3e5403034a816afaeaf03b7d1cc1adee29ffeed8..b290d9ff6d2411c0fcddd9eb4045a13b09344aaf 100644 (file)
 #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
index 3d43825ba4ea9465eec57405993fe3708a52113c..d89d95255df5e18595fab99b5cbc456afb01f007 100644 (file)
 #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)
index 4b9da418b07b7c42b3252488a34481522e73bbab..6c247792c4ec4901b14473ed4bb0367d88c8cdaf 100644 (file)
 #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).
index d573294bd2c0afc8e62f0f374af99509bb2d029b..073ba4cc0c8741fe09afbcd7ebf013d028da4652 100644 (file)
 #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
index 237a21a9d3c3e07caea2085642dc9ec450c88a58..7ccbcbf81e8ed69033055f237e0bca8ad5887064 100644 (file)
@@ -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 */
index 20a77f172f0ef49f8182e2ab6f4e3e3b5b38b7b5..47b134159fed29ba89d1ad87cfdc0d6343894851 100644 (file)
 #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))
 
index 723acc481fdd179d7ee39579969ee0c0ef99f686..dcb8cf74a8461eeb8649df1c2aa3d33c97df6f42 100644 (file)
 #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 */
 
index 640b8597a3a61d391f34bc4f55a5e9c7810f99e6..822f14e1280f219d94fa5bb3770dbfb549cc3174 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
 #ifdef KRB4
 #include "security.h"
 #endif
+/* The last #include file should be: */
+#ifdef MALLOCDEBUG
+#include "memdebug.h"
+#endif
 
 /* -- -- */