[gnome-epub-thumbnailer/wip/hadess/epub-workaround: 4/6] epub: Use g_autofree for metafile
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-epub-thumbnailer/wip/hadess/epub-workaround: 4/6] epub: Use g_autofree for metafile
- Date: Wed, 28 Sep 2022 15:42:42 +0000 (UTC)
commit dc5b88ba2c63aaa7c52a357ded73e9b60255d426
Author: Bastien Nocera <hadess hadess net>
Date: Wed Sep 28 17:19:15 2022 +0200
epub: Use g_autofree for metafile
gnome-epub-thumbnailer.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gnome-epub-thumbnailer.c b/gnome-epub-thumbnailer.c
index eb1e110..65d7fca 100644
--- a/gnome-epub-thumbnailer.c
+++ b/gnome-epub-thumbnailer.c
@@ -275,7 +275,7 @@ file_to_data (const char *path,
gsize *ret_length,
GError **error)
{
- char *metafile;
+ g_autofree char *metafile = NULL;
gsize length;
char *cover_path;
char *cover_data = NULL;
@@ -288,7 +288,6 @@ file_to_data (const char *path,
}
g_debug ("#### META-INF/container.xml contents ####\n %s", metafile);
cover_path = get_cover_path_from_root_file (metafile, length, path);
- g_free (metafile);
if (cover_path != NULL) {
cover_data = file_get_zipped_contents (path, (GCompareFunc) g_strcmp0, cover_path, &length);
if (cover_data == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]