[Ada] Fix potentially uninitialized variable flagged by CodePeer

gcc/ada/

	* libgnat/g-socket.adb (Wait_On_Socket): Fix potentially
	uninitialized variable.
This commit is contained in:
Arnaud Charlet 2020-05-30 14:01:17 -04:00 committed by Pierre-Marie de Rodat
parent f0d0be62db
commit a2f4fc6f3f

View File

@ -2062,8 +2062,11 @@ package body GNAT.Sockets is
Close_Selector (S.all);
Unchecked_Free (Local_S);
end if;
exception
when others =>
Status := Completed;
if Selector = null then
Close_Selector (S.all);
Unchecked_Free (Local_S);