[gnome-software] trivial: Fix a small memory leak when parsing markdown text



commit c4094253f8c0736afa465f9f1f267517a1582e99
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jan 16 11:21:36 2014 +0000

    trivial: Fix a small memory leak when parsing markdown text

 src/gs-markdown.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-markdown.c b/src/gs-markdown.c
index b44704e..a674dea 100644
--- a/src/gs-markdown.c
+++ b/src/gs-markdown.c
@@ -391,7 +391,7 @@ gs_markdown_to_text_line_format (GsMarkdown *self, const gchar *line)
        GString *string;
        GsMarkdownPrivate *priv = gs_markdown_get_instance_private (self);
        gboolean mode = FALSE;
-       gchar **codes;
+       gchar **codes = NULL;
        gchar *text;
        guint i;
 
@@ -421,6 +421,7 @@ gs_markdown_to_text_line_format (GsMarkdown *self, const gchar *line)
        }
        text = g_string_free (string, FALSE);
 out:
+       g_strfreev (codes);
        return text;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]