From 3a85e17c465838aecef252d2929afe6921b787fe Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 6 Jan 2017 03:23:42 +0000 Subject: __ntapi_pty_inherit(): do not repeat __ntapi_pty_free() upon failure. --- src/pty/ntapi_pty_fd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/pty') diff --git a/src/pty/ntapi_pty_fd.c b/src/pty/ntapi_pty_fd.c index b35804e..fdb9ae4 100644 --- a/src/pty/ntapi_pty_fd.c +++ b/src/pty/ntapi_pty_fd.c @@ -312,10 +312,8 @@ int32_t __stdcall __ntapi_pty_inherit( ctx->luid.low = inherit.luid.low; ctx->luid.high = inherit.luid.high; - if ((status = __ntapi_pty_connect(hport,ctx,&iosb))) { - __ntapi_pty_free(ctx); + if ((status = __ntapi_pty_connect(hport,ctx,&iosb))) return status; - } if ((status = __ntapi_pty_set( ctx,&iosb, -- cgit v1.2.3