[glib] gresource-tool: Fix minor memory leak when listing resources
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gresource-tool: Fix minor memory leak when listing resources
- Date: Sat, 3 Oct 2015 10:44:29 +0000 (UTC)
commit c1c001e300debcea9ba6630c1a87f56036840c52
Author: Philip Withnall <philip withnall collabora co uk>
Date: Sat Oct 3 11:43:49 2015 +0100
gresource-tool: Fix minor memory leak when listing resources
Coverity CID: 1325353
gio/gresource-tool.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gio/gresource-tool.c b/gio/gresource-tool.c
index cc4e78b..984db37 100644
--- a/gio/gresource-tool.c
+++ b/gio/gresource-tool.c
@@ -91,7 +91,10 @@ list_resource (GResource *resource,
len = MIN (strlen (child), strlen (prefix));
if (strncmp (child, prefix, len) != 0)
- continue;
+ {
+ g_free (child);
+ continue;
+ }
if (g_resource_get_info (resource, child, 0, &size, &flags, NULL))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]