[epiphany] Fix memory leak in profile migrator
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Fix memory leak in profile migrator
- Date: Sun, 21 Jul 2019 16:54:37 +0000 (UTC)
commit c20cc543d2bda6a64f9fc925231f0b27d1de11e6
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Sun Jul 21 14:15:17 2019 +0200
Fix memory leak in profile migrator
src/profile-migrator/ephy-profile-migrator.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/profile-migrator/ephy-profile-migrator.c b/src/profile-migrator/ephy-profile-migrator.c
index f4faeab47..d88159719 100644
--- a/src/profile-migrator/ephy-profile-migrator.c
+++ b/src/profile-migrator/ephy-profile-migrator.c
@@ -408,7 +408,7 @@ static void
migrate_adblock_filters (void)
{
char *adblock_dir;
- char *filters_filename;
+ g_autofree char *filters_filename = NULL;
char *contents;
gsize content_size;
GPtrArray *filters_array = NULL;
@@ -434,7 +434,6 @@ migrate_adblock_filters (void)
if (!g_file_get_contents (filters_filename, &contents, &content_size, &error)) {
if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
g_warning ("Failed to read filters file: %s: %s", filters_filename, error->message);
- g_free (filters_filename);
g_error_free (error);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]