[gnome-autoar/wip/oholy/various-fixes: 2/17] 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: 2/17] extractor: Fix leaked value from g_file_get_path
- Date: Mon, 8 Mar 2021 08:52:59 +0000 (UTC)
commit 5e0732e1d42b7d20c3f5fac03461222095d400d1
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 47b1b90..4841ef0 100644
--- a/gnome-autoar/autoar-extractor.c
+++ b/gnome-autoar/autoar-extractor.c
@@ -1751,7 +1751,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]