Merge branch 'dev' into dev-slice

This commit is contained in:
Daan 2024-03-29 11:17:36 -07:00
commit f199b888b4

View file

@ -396,7 +396,8 @@ char* mi_heap_realpath(mi_heap_t* heap, const char* fname, char* resolved_name)
char* rname = realpath(fname, NULL); char* rname = realpath(fname, NULL);
if (rname == NULL) return NULL; if (rname == NULL) return NULL;
char* result = mi_heap_strdup(heap, rname); 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; return result;
} }
/* /*