When connect_to_sdoc_tcp function failed to connect a socket due to an error other than EINTR, it doesn't free the socket file descriptor. This fixes the leak bug. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxxxxxx> --- usr/bs_sheepdog.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr/bs_sheepdog.c b/usr/bs_sheepdog.c index 3edc720..07ad0de 100644 --- a/usr/bs_sheepdog.c +++ b/usr/bs_sheepdog.c @@ -372,6 +372,7 @@ reconnect: if (errno == EINTR) goto reconnect; + close(fd); break; } -- 1.7.9.3 -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html