summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2021-01-10 10:12:08 +0100
committerTimm Bäder <mail@baedert.org>2021-01-17 04:39:26 +0100
commitec8614e8e488c0a7b3d74ef31c058ff2b5bd61ad (patch)
tree40810431f56bb86998807c1f2945a65bdd4c260b
parentcb41b96a9e4e0ab113395b9761b894d03bff5794 (diff)
downloadgtk+-ec8614e8e488c0a7b3d74ef31c058ff2b5bd61ad.tar.gz
label: Fix a potential memory leak
This only happens in error cases so not very interesting. Anyway, try to make scan-build happy.
-rw-r--r--gtk/gtklabel.c5
1 files changed, 4 insertions, 1 deletions
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)
{