Skip to content

Commit 655909f

Browse files
Clean up allocated string during OOM from path normalization
1 parent 5eb9050 commit 655909f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

loader/loader.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,7 @@ VkResult fixup_library_binary_path(const struct loader_instance *inst, char **li
636636
// Normalize the path so that the comparison doesn't yield false positives
637637
res = normalize_path(inst, &os_determined_lib_name);
638638
if (res == VK_ERROR_OUT_OF_HOST_MEMORY) {
639+
loader_instance_heap_free(inst, os_determined_lib_name);
639640
return res;
640641
}
641642

0 commit comments

Comments
 (0)