[glib-networking/glib-2-66] gtlslog: fix leak in error path
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/glib-2-66] gtlslog: fix leak in error path
- Date: Thu, 7 Jan 2021 16:29:37 +0000 (UTC)
commit 299323a919fa4905294b3465341e3576726c51b1
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Mon Nov 16 13:41:57 2020 -0600
gtlslog: fix leak in error path
Found by coverity
tls/base/gtlslog.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/tls/base/gtlslog.c b/tls/base/gtlslog.c
index 1dbb699..cf3ab05 100644
--- a/tls/base/gtlslog.c
+++ b/tls/base/gtlslog.c
@@ -50,7 +50,7 @@ void g_tls_log (GLogLevelFlags level,
va_end (args);
if (ret <= 0)
- return;
+ goto out;
if (conn && G_IS_TLS_CONNECTION (conn)) {
if (G_IS_TLS_CLIENT_CONNECTION (conn))
@@ -71,6 +71,7 @@ void g_tls_log (GLogLevelFlags level,
"CODE_FUNC", func,
"MESSAGE", "%s%s", header, message);
+out:
g_free (header);
g_free (message);
g_free (thread);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]