Skip to content

Commit 0d59ec0

Browse files
authored
Fix memory leak in open_aot_data (#121488)
Free filename string, that allocates in open_aot_data function and leaks on return. Signed-off-by: Aleksandr Dovydenkov <asd@altlinux.org>. Found by Linux Verification Center (linuxtesting.org) with SVACE.
1 parent ccced2e commit 0d59ec0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/mono/mono/mini/aot-runtime.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,6 +1622,7 @@ open_aot_data (MonoAssembly *assembly, MonoAotFileInfo *info, void **ret_handle)
16221622
data = (guint8*)mono_file_map (info->datafile_size, MONO_MMAP_READ, mono_file_map_fd (map), 0, ret_handle);
16231623
g_assert (data);
16241624

1625+
g_free(filename);
16251626
return data;
16261627
}
16271628

0 commit comments

Comments
 (0)