Skip to content
Snippets Groups Projects
Commit 29cd42e0 authored by Dmitriy Anisimkov's avatar Dmitriy Anisimkov Committed by Pierre-Marie de Rodat
Browse files

[Ada] Fix memory leak in GNAT.Expect.Non_Blocking_Spawn on Windows

gcc/ada/

	* libgnat/g-expect.adb (Non_Blocking_Spawn): Deallocate elements
	on Arg_List after calling Set_Up_Child_Communications.
parent 64f4351d
No related branches found
No related tags found
No related merge requests found
...@@ -1181,6 +1181,12 @@ package body GNAT.Expect is ...@@ -1181,6 +1181,12 @@ package body GNAT.Expect is
Set_Up_Child_Communications Set_Up_Child_Communications
(Descriptor, Pipe1, Pipe2, Pipe3, Command_With_Path.all, (Descriptor, Pipe1, Pipe2, Pipe3, Command_With_Path.all,
C_Arg_List'Address); C_Arg_List'Address);
-- On Windows systems we need to release memory taken for Arg_List
for A of Arg_List loop
Free (A);
end loop;
end if; end if;
Free (Command_With_Path); Free (Command_With_Path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment