[gtk/wip/baedert/for-master: 26/31] label: Fix a potential memory leak
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 26/31] label: Fix a potential memory leak
- Date: Tue, 12 Jan 2021 20:39:47 +0000 (UTC)
commit 789b0da30b6202d8f978e0c8c3163cc22f89a11b
Author: Timm Bäder <mail baedert org>
Date: Sun Jan 10 10:12:08 2021 +0100
label: Fix a potential memory leak
This only happens in error cases so not very interesting. Anyway, try to
make scan-build happy.
gtk/gtklabel.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 1c8a31f231..0ed8456787 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3500,7 +3500,10 @@ no_uline:
/* Extract the text to display */
if (!pango_parse_markup (new_text, -1, '_',
do_mnemonics ? &attrs : NULL, &text, NULL, &error))
- goto error_set;
+ {
+ g_free (new_text);
+ goto error_set;
+ }
if (do_mnemonics)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]