aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/util.c7
-rw-r--r--src/common/util.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c
index d4a939b14f..d0f568486c 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -204,6 +204,13 @@ _tor_memdup(const void *mem, size_t len DMALLOC_PARAMS)
return dup;
}
+/** Helper for places that need to take a function pointer to the right
+ * spelling of "free()". */
+void
+_tor_free(void *mem) {
+ tor_free(mem);
+}
+
/* =====
* String manipulation
* ===== */
diff --git a/src/common/util.h b/src/common/util.h
index a10e107724..22f4ea3b99 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -75,6 +75,7 @@ char *_tor_strndup(const char *s, size_t n DMALLOC_PARAMS)
ATTR_MALLOC ATTR_NONNULL((1));
void *_tor_memdup(const void *mem, size_t len DMALLOC_PARAMS)
ATTR_MALLOC ATTR_NONNULL((1));
+void _tor_free(void *mem);
#ifdef USE_DMALLOC
extern int dmalloc_free(const char *file, const int line, void *pnt,
const int func_id);