[glib/wip/oholy/gappinfo-async: 1/5] gfile: Fix leak in g_file_query_default_handler()
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/oholy/gappinfo-async: 1/5] gfile: Fix leak in g_file_query_default_handler()
- Date: Mon, 28 Jan 2019 14:53:42 +0000 (UTC)
commit a0b1c95e6ed440c2ca7d83a15752c1ac70e4715e
Author: Ondrej Holy <oholy redhat com>
Date: Mon Jan 28 15:18:37 2019 +0100
gfile: Fix leak in g_file_query_default_handler()
Add missing `g_free (uri_scheme)` to fix leak when `uri_scheme[0]`
is equal to `\0`.
gio/gfile.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gio/gfile.c b/gio/gfile.c
index a5709a4cc..e6b468b55 100644
--- a/gio/gfile.c
+++ b/gio/gfile.c
@@ -6851,6 +6851,8 @@ g_file_query_default_handler (GFile *file,
if (appinfo != NULL)
return appinfo;
}
+ else
+ g_free (uri_scheme);
info = g_file_query_info (file,
G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]