[gnome-autoar/wip/oholy/various-fixes: 4/23] extractor: Fix leaked value from g_file_get_path
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-autoar/wip/oholy/various-fixes: 4/23] extractor: Fix leaked value from g_file_get_path
- Date: Fri, 12 Mar 2021 15:42:20 +0000 (UTC)
commit f2175bd3a8604c433129d2f39a7dcb71170d646f
Author: Ondrej Holy <oholy redhat com>
Date: Thu Feb 18 13:30:44 2021 +0100
extractor: Fix leaked value from g_file_get_path
The returned value from `g_file_get_path` is not consequently freed.
Let's use `g_file_peek_path` instead to fix the leak.
gnome-autoar/autoar-extractor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnome-autoar/autoar-extractor.c b/gnome-autoar/autoar-extractor.c
index 3e2644d..c851972 100644
--- a/gnome-autoar/autoar-extractor.c
+++ b/gnome-autoar/autoar-extractor.c
@@ -1699,7 +1699,7 @@ autoar_extractor_step_scan_toplevel (AutoarExtractor *self)
}
if (self->use_raw_format) {
- pathname = autoar_common_get_basename_remove_extension (g_file_get_path(self->source_file));
+ pathname = autoar_common_get_basename_remove_extension (g_file_peek_path (self->source_file));
g_debug ("autoar_extractor_step_scan_toplevel: %d: raw pathname = %s",
self->total_files, pathname);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]