openbsd-ports/net/torsocks/patches/patch-src_lib_fclose_c
jsing 7543c2438a Unbreak funopen usage with libtorsocks - always call the libc fclose
function, even when fd < 0.

ok jca@ pascal@ solene@
2018-05-12 16:52:25 +00:00

22 lines
461 B
Plaintext

$OpenBSD: patch-src_lib_fclose_c,v 1.1 2018/05/12 16:52:25 jsing Exp $
Unbreak funopen usage with libtorsocks - always call the libc fclose
function, even when fd < 0.
Index: src/lib/fclose.c
--- src/lib/fclose.c.orig
+++ src/lib/fclose.c
@@ -64,11 +64,9 @@ LIBC_FCLOSE_RET_TYPE tsocks_fclose(LIBC_FCLOSE_SIG)
connection_put_ref(conn);
}
+error:
/* Return the original libc fclose. */
return tsocks_libc_fclose(fp);
-
-error:
- return -1;
}
/*