[gnome-epub-thumbnailer/wip/hadess/epub-workaround: 5/6] epub: Use g_autofree for cover_path
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-epub-thumbnailer/wip/hadess/epub-workaround: 5/6] epub: Use g_autofree for cover_path
- Date: Wed, 28 Sep 2022 15:42:42 +0000 (UTC)
commit 18fa3a694d5126533ad7151a3f2193704659907c
Author: Bastien Nocera <hadess hadess net>
Date: Wed Sep 28 17:20:04 2022 +0200
epub: Use g_autofree for cover_path
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 65d7fca..41d9653 100644
--- a/gnome-epub-thumbnailer.c
+++ b/gnome-epub-thumbnailer.c
@@ -276,8 +276,8 @@ file_to_data (const char *path,
GError **error)
{
g_autofree char *metafile = NULL;
+ g_autofree char *cover_path = NULL;
gsize length;
- char *cover_path;
char *cover_data = NULL;
/* Look for the cover in the metafile */
@@ -293,7 +293,6 @@ file_to_data (const char *path,
if (cover_data == NULL)
g_warning ("Could not open cover file '%s' in '%s'",
cover_path, path);
- g_free (cover_path);
}
/* Look for it by name instead */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]