THRIFT-1842 Memory leak with Pipes
Patch: Jens Geyer
diff --git a/lib/delphi/test/TestClient.pas b/lib/delphi/test/TestClient.pas
index baeaaa8..e72775e 100644
--- a/lib/delphi/test/TestClient.pas
+++ b/lib/delphi/test/TestClient.pas
@@ -176,6 +176,10 @@
end
else if (args[i] = '-anon') then // -anon <hReadPipe> <hWritePipe>
begin
+ if Length(args) <= (i+2) then begin
+ Console.WriteLine('Invalid args: -anon <hRead> <hWrite> or use "server.exe -anon"');
+ Halt(1);
+ end;
Console.WriteLine('Anonymous pipes transport');
Inc( i);
hAnonRead := THandle( StrToIntDef( args[i], Integer(INVALID_HANDLE_VALUE)));