From 0f98b2f4ec683fc29bee489cafdbbdc7d59ffa1d Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Sat, 3 Oct 2015 11:46:18 +0100 Subject: [PATCH] gsocks5proxy: Fix error reporting in authentication set_auth_msg() was returning FALSE to indicate error, but all its callers were expecting a negative return value to indicate error. This was causing memory leaks for the GError, and errors to not be reported. Coverity CID: 1325357 --- gio/gsocks5proxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/gsocks5proxy.c b/gio/gsocks5proxy.c index d093c81a9..764f9cf19 100644 --- a/gio/gsocks5proxy.c +++ b/gio/gsocks5proxy.c @@ -205,7 +205,7 @@ set_auth_msg (guint8 *msg, g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_PROXY_FAILED, _("Username or password is too long for SOCKSv5 " "protocol.")); - return FALSE; + return -1; } msg[len++] = SOCKS5_AUTH_VERSION;