Skip to content

Commit 89064be

Browse files
committed
Fix memory leak in mono/mini/aot-compiler.c
Free GString export_symbols that allocates in add_native_to_managed_wrappers with a minimum size of 16 bytes. Signed-off-by: Aleksandr Dovydenkov <asd@altlinux.org> Found by Linux Verification Center (linuxtesting.org) with SVACE.
1 parent 1547c9a commit 89064be

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5570,6 +5570,8 @@ MONO_RESTORE_WARNING
55705570
fprintf (export_symbols_outfile, "%s", export_symbols_out);
55715571
g_free (export_symbols_out);
55725572
fclose (export_symbols_outfile);
5573+
} else {
5574+
g_string_free(export_symbols, TRUE);
55735575
}
55745576
}
55755577

0 commit comments

Comments
 (0)