summaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 75de4e3c..4a1b4bf5 100644
--- a/src/util.c
+++ b/src/util.c
@@ -139,7 +139,7 @@ jv jq_realpath(jv path) {
path_max = PATH_MAX;
#endif
if (path_max > 0) {
- buf = malloc(sizeof(char) * path_max);
+ buf = jv_mem_alloc(path_max);
}
#ifdef WIN32
char *tmp = _fullpath(buf, jv_string_value(path), path_max);