OK, thanks! I did not see any reply to the email, this is why I was wondering what happened there.
----- Original Message ----- > From: "David Goulet" <[email protected]> > To: "Mathieu Desnoyers" <[email protected]> > Cc: [email protected] > Sent: Saturday, October 4, 2014 9:27:39 AM > Subject: Re: [PATCH lttng-tools] Fix: FD leak in accept error handling > > That has been fix. > > commit 475cd9fa36ab2ad108f94bb8292bdcdbbbc6e38f > > This was a coverity issue fixed on sept. 30th. > > David > > On 04 Oct (13:24:02), Mathieu Desnoyers wrote: > > Bump. > > > > ----- Original Message ----- > > > From: "Mathieu Desnoyers" <[email protected]> > > > To: [email protected] > > > Cc: [email protected], "Mathieu Desnoyers" > > > <[email protected]> > > > Sent: Saturday, September 27, 2014 7:49:22 PM > > > Subject: [PATCH lttng-tools] Fix: FD leak in accept error handling > > > > > > *** CID 1241799: Resource leak (RESOURCE_LEAK) > > > /src/common/sessiond-comm/inet.c: 324 in lttcomm_accept_inet_sock() > > > 318 > > > 319 end: > > > 320 return new_sock; > > > 321 > > > 322 error: > > > 323 free(new_sock); > > > >>> CID 1241799: Resource leak (RESOURCE_LEAK) > > > >>> Handle variable "new_fd" going out of scope leaks the handle. > > > 324 return NULL; > > > 325 } > > > 326 > > > 327 /* > > > 328 * Make the socket listen using LTTNG_SESSIOND_COMM_MAX_LISTEN. > > > 329 */ > > > > > > Signed-off-by: Mathieu Desnoyers <[email protected]> > > > --- > > > src/common/sessiond-comm/inet.c | 10 +++++++++- > > > 1 file changed, 9 insertions(+), 1 deletion(-) > > > > > > diff --git a/src/common/sessiond-comm/inet.c > > > b/src/common/sessiond-comm/inet.c > > > index cf06ecb..4e34ad0 100644 > > > --- a/src/common/sessiond-comm/inet.c > > > +++ b/src/common/sessiond-comm/inet.c > > > @@ -272,7 +272,7 @@ error_connect: > > > LTTNG_HIDDEN > > > struct lttcomm_sock *lttcomm_accept_inet_sock(struct lttcomm_sock *sock) > > > { > > > - int new_fd; > > > + int new_fd, closeret; > > > socklen_t len; > > > struct lttcomm_sock *new_sock; > > > unsigned long timeout; > > > @@ -305,10 +305,18 @@ struct lttcomm_sock > > > *lttcomm_accept_inet_sock(struct > > > lttcomm_sock *sock) > > > > > > ret = lttcomm_setsockopt_rcv_timeout(new_fd, timeout); > > > if (ret) { > > > + closeret = close(new_fd); > > > + if (closeret) { > > > + PERROR("close"); > > > + } > > > goto error; > > > } > > > ret = lttcomm_setsockopt_snd_timeout(new_fd, timeout); > > > if (ret) { > > > + closeret = close(new_fd); > > > + if (closeret) { > > > + PERROR("close"); > > > + } > > > goto error; > > > } > > > } > > > -- > > > 2.1.0 > > > > > > > > > > -- > > Mathieu Desnoyers > > EfficiOS Inc. > > http://www.efficios.com > -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
