[or-cvs] r10912: Use tor malloc replacements in eventdns.c for now: there mig (in tor/trunk: . src/or)
nickm at seul.org
nickm at seul.org
Mon Jul 23 04:18:22 UTC 2007
Author: nickm
Date: 2007-07-23 00:18:20 -0400 (Mon, 23 Jul 2007)
New Revision: 10912
Modified:
tor/trunk/
tor/trunk/src/or/eventdns.c
Log:
r13773 at kushana: nickm | 2007-07-23 00:16:44 -0400
Use tor malloc replacements in eventdns.c for now: there might be goblins there...goblins that only dmalloc can find!
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r13773] on c95137ef-5f19-0410-b913-86e773d04f59
Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c 2007-07-23 04:18:04 UTC (rev 10911)
+++ tor/trunk/src/or/eventdns.c 2007-07-23 04:18:20 UTC (rev 10912)
@@ -122,6 +122,14 @@
#include <stdio.h>
#endif
+/* XXXX020 These are for debugging possible memory leaks. */
+#include "../common/util.h"
+#include "../common/compat.h"
+#define malloc(x) tor_malloc(x)
+#define realloc(x,y) tor_realloc((x),(y))
+#define free(x) tor_free(x)
+#define _free(x) _tor_free(x)
+
#undef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
@@ -584,7 +592,7 @@
}
CLEAR(req);
- free(req);
+ _free(req);
evdns_requests_pump_waiting_queue();
}
@@ -2229,9 +2237,9 @@
req->next = req->prev = NULL;
return req;
-err1:
+ err1:
CLEAR(req);
- free(req);
+ _free(req);
return NULL;
}
@@ -2360,10 +2368,10 @@
for (dom = state->head; dom; dom = next) {
next = dom->next;
CLEAR(dom);
- free(dom);
+ _free(dom);
}
CLEAR(state);
- free(state);
+ _free(state);
}
}
@@ -2496,7 +2504,7 @@
char *const new_name = search_make_new(global_search_state, 0, name);
if (!new_name) return 1;
req = request_new(type, new_name, flags, user_callback, user_arg);
- free(new_name);
+ _free(new_name);
if (!req) return 1;
req->search_index = 0;
}
More information about the tor-commits
mailing list