summaryrefslogtreecommitdiff
path: root/src/references.c
diff options
context:
space:
mode:
authorYuki Izumi <kivikakk@github.com>2016-09-26 15:44:36 +1000
committerYuki Izumi <kivikakk@github.com>2016-09-26 15:44:37 +1000
commitf4e9ba2068880d25034ebeca172e521d34d6b540 (patch)
treea1cf9403f32b3fc1cb408e21b2456068ca3ea931 /src/references.c
parent53ef343a65e3da19d605cfb7e8909004cfac954e (diff)
Use cmark_mem to free where used to alloc
Diffstat (limited to 'src/references.c')
-rw-r--r--src/references.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/references.c b/src/references.c
index e141213..89f2dc8 100644
--- a/src/references.c
+++ b/src/references.c
@@ -46,7 +46,7 @@ static unsigned char *normalize_reference(cmark_mem *mem, cmark_chunk *ref) {
assert(result);
if (result[0] == '\0') {
- free(result);
+ mem->free(result);
return NULL;
}
@@ -114,7 +114,7 @@ cmark_reference *cmark_reference_lookup(cmark_reference_map *map,
ref = ref->next;
}
- free(norm);
+ map->mem->free(norm);
return ref;
}
@@ -135,7 +135,7 @@ void cmark_reference_map_free(cmark_reference_map *map) {
}
}
- free(map);
+ map->mem->free(map);
}
cmark_reference_map *cmark_reference_map_new(cmark_mem *mem) {