[glib/wip/oholy/gappinfo-async: 62/66] 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: 62/66] gfile: Fix leak in g_file_query_default_handler()
- Date: Mon, 28 Jan 2019 15:44:02 +0000 (UTC)
commit 0a1730d7ea486d07a10b238d7f6fdaa41218c5e4
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]