[glib/glib-2-70: 5/18] gopenuriportal: Fix GVariantBuilder and string leakage on g_open failure
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-70: 5/18] gopenuriportal: Fix GVariantBuilder and string leakage on g_open failure
- Date: Tue, 19 Oct 2021 06:21:25 +0000 (UTC)
commit b293fc537614cb6f62810580d823209241f1ec72
Author: Egor Bychin <e bychin drweb com>
Date: Mon Oct 11 14:00:03 2021 +0300
gopenuriportal: Fix GVariantBuilder and string leakage on g_open failure
gio/gopenuriportal.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gio/gopenuriportal.c b/gio/gopenuriportal.c
index be68569ed..6ef8f037c 100644
--- a/gio/gopenuriportal.c
+++ b/gio/gopenuriportal.c
@@ -108,6 +108,8 @@ g_openuri_portal_open_uri (const char *uri,
errsv = errno;
if (fd == -1)
{
+ g_free (path);
+ g_variant_builder_clear (&opt_builder);
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errsv),
"Failed to open '%s'", path);
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]