diff -r 919516f93dcf -r 1e1db86ea836 src/jdk.net/linux/native/libextnet/rdma_util_md.c --- a/src/jdk.net/linux/native/libextnet/rdma_util_md.c Wed Jan 30 14:24:11 2019 +0000 +++ b/src/jdk.net/linux/native/libextnet/rdma_util_md.c Thu Jan 31 14:12:49 2019 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -225,6 +225,7 @@ int rv, s; s = rs_socket(PF_INET, SOCK_STREAM, 0); if (s < 0) { + rs_close(s); return JNI_FALSE; } return JNI_TRUE; @@ -331,7 +332,7 @@ if (read_rv > 0) { break; } - } + } return (nanoTimeout / NET_NSEC_PER_MSEC); }