提交 6bed96ed 编写于 作者: W weijun

6588160: jaas krb5 client leaks OS-level UDP sockets (all platforms)

Reviewed-by: jccollet, chegar
上级 17a9da6b
...@@ -274,6 +274,7 @@ public abstract class KrbKdcReq { ...@@ -274,6 +274,7 @@ public abstract class KrbKdcReq {
+ ",Attempt =" + i + ",Attempt =" + i
+ ", #bytes=" + obuf.length); + ", #bytes=" + obuf.length);
} }
try {
/* /*
* Send the data to the kdc. * Send the data to the kdc.
*/ */
...@@ -296,6 +297,9 @@ public abstract class KrbKdcReq { ...@@ -296,6 +297,9 @@ public abstract class KrbKdcReq {
throw se; throw se;
} }
} }
} finally {
kdcClient.close();
}
} }
} }
return ibuf; return ibuf;
......
...@@ -93,4 +93,7 @@ public class UDPClient { ...@@ -93,4 +93,7 @@ public class UDPClient {
return data; return data;
} }
public void close() {
dgSocket.close();
}
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册