From 03c710b66006b0c78fa2bf27b9b8e71f116c691b Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 31 Jan 2008 02:07:05 +0000 Subject: [PATCH] a bit safer free. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7442 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/curl/lib/url.c | 2 +- libs/curl/lib/url.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/curl/lib/url.c b/libs/curl/lib/url.c index 4fcc18aa99..1e1ff3cc6d 100644 --- a/libs/curl/lib/url.c +++ b/libs/curl/lib/url.c @@ -200,7 +200,7 @@ RETSIGTYPE alarmfunc(int sig) #endif /* WIN32 */ #endif /* USE_ARES */ -void Curl_safefree(void *ptr) +void Curl_safefree_x(void *ptr) { if(ptr) free(ptr); diff --git a/libs/curl/lib/url.h b/libs/curl/lib/url.h index b9bfabf82b..668b444069 100644 --- a/libs/curl/lib/url.h +++ b/libs/curl/lib/url.h @@ -44,7 +44,8 @@ CURLcode Curl_disconnect(struct connectdata *); CURLcode Curl_protocol_connect(struct connectdata *conn, bool *done); CURLcode Curl_protocol_connecting(struct connectdata *conn, bool *done); CURLcode Curl_protocol_doing(struct connectdata *conn, bool *done); -void Curl_safefree(void *ptr); +void Curl_safefree_x(void *ptr); +#define Curl_safefree(ptr) Curl_safefree_x(ptr), ptr = NULL /* create a connection cache */ struct conncache *Curl_mk_connc(int type);