summaryrefslogtreecommitdiff
path: root/gcc/ada/g-socket.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/g-socket.adb')
-rw-r--r--gcc/ada/g-socket.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb
index 5ad723bab26..97967a5b8e7 100644
--- a/gcc/ada/g-socket.adb
+++ b/gcc/ada/g-socket.adb
@@ -34,6 +34,7 @@
with Ada.Streams; use Ada.Streams;
with Ada.Exceptions; use Ada.Exceptions;
with Ada.Unchecked_Conversion;
+with Ada.Unchecked_Deallocation;
with Interfaces.C.Strings;
@@ -777,6 +778,17 @@ package body GNAT.Sockets is
end if;
end Finalize;
+ ----------
+ -- Free --
+ ----------
+
+ procedure Free (Stream : in out Stream_Access) is
+ procedure Do_Free is new Ada.Unchecked_Deallocation
+ (Ada.Streams.Root_Stream_Type'Class, Stream_Access);
+ begin
+ Do_Free (Stream);
+ end Free;
+
---------
-- Get --
---------