mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
introduce new tor_free() macro
svn:r643
This commit is contained in:
@@ -467,7 +467,6 @@ tor_tls_get_peer_cert_nickname(tor_tls *tls, char *buf, int buflen)
|
||||
X509_NAME *name = NULL;
|
||||
int nid;
|
||||
int lenout;
|
||||
int i;
|
||||
|
||||
if (!(cert = SSL_get_peer_certificate(tls->ssl))) {
|
||||
log_fn(LOG_WARN, "Peer has no certificate");
|
||||
|
||||
@@ -32,18 +32,16 @@
|
||||
#define INLINE inline
|
||||
#endif
|
||||
|
||||
#define xfree(p) do {if(p) {free(p); (p)=NULL;}} while(0) /* XXX use everywhere? */
|
||||
void *tor_malloc(size_t size);
|
||||
void *tor_realloc(void *ptr, size_t size);
|
||||
char *tor_strdup(const char *s);
|
||||
#define tor_free(p) do {if(p) {free(p); (p)=NULL;}} while(0)
|
||||
|
||||
void tor_gettimeofday(struct timeval *timeval);
|
||||
|
||||
long tv_udiff(struct timeval *start, struct timeval *end);
|
||||
|
||||
void tv_addms(struct timeval *a, long ms);
|
||||
void tv_add(struct timeval *a, struct timeval *b);
|
||||
int tv_cmp(struct timeval *a, struct timeval *b);
|
||||
|
||||
time_t tor_timegm (struct tm *tm);
|
||||
|
||||
int write_all(int fd, const char *buf, size_t count);
|
||||
|
||||
Reference in New Issue
Block a user