Skip to content

Commit

Permalink
Merge branch 'dev' into dev-slice
Browse files Browse the repository at this point in the history
  • Loading branch information
daanx committed Mar 29, 2024
2 parents bcf975c + 8f7d1e9 commit f199b88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ char* mi_heap_realpath(mi_heap_t* heap, const char* fname, char* resolved_name)
char* rname = realpath(fname, NULL);
if (rname == NULL) return NULL;
char* result = mi_heap_strdup(heap, rname);
free(rname); // use regular free! (which may be redirected to our free but that's ok)
mi_cfree(rname); // use checked free (which may be redirected to our free but that's ok)
// note: with ASAN realpath is intercepted and mi_cfree may leak the returned pointer :-(
return result;
}
/*
Expand Down

0 comments on commit f199b88

Please sign in to comment.