facebook / facebook/infer

False positive: RESOURCE_LEAK for Drift

Ouverte
#781 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
false-positive
Langage dominant
OCaml
Étoiles
15.7k
Forks
2.1k
Merge moyen
19 h 36 min
PR mergées (30 j)
13

Description

Infer version v0.13.0-4488ab099
repo: https://github.com/airlift/drift
commit: `ec21ec853535ccbbfea74a8981da97b81b68b3c0`

```
drift-transport-apache/src/main/java/io/airlift/drift/transport/apache/ApacheThriftMethodInvoker.java:181: error: RESOURCE_LEAK
resource of type `java.net.Socket` acquired to `socket` by call to `new()` at line 170 is not released after line 181.
179. HostAndPort sslConnectAddress = socksProxy.orElse(address);
180.
181. > socket = sslContext.getSocketFactory().createSocket(socket, sslConnectAddress.getHost(), sslConnectAddress.getPort(), true);
182. setSocketProperties(socket);
183. }
```

The [`createSocket()`](https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/SSLSocketFactory.html) method with the `autoClose` flag set to true returns a socket that will close the underlying socket.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.