[glib] glocalfileinfo: Fix a leak on an error handling path
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] glocalfileinfo: Fix a leak on an error handling path
- Date: Fri, 17 Nov 2017 15:10:44 +0000 (UTC)
commit 9ab0073321c3feaf2584e41701092117a6fb9a1c
Author: Philip Withnall <withnall endlessm com>
Date: Fri Nov 17 14:39:55 2017 +0000
glocalfileinfo: Fix a leak on an error handling path
Spotted by Clang static analysis, thanks to Leslie Zhai.
Signed-off-by: Philip Withnall <withnall endlessm com>
https://bugzilla.gnome.org/show_bug.cgi?id=777075
gio/glocalfileinfo.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index fad80d3..f0c99df 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -657,7 +657,10 @@ get_xattrs_from_fd (int fd,
}
if (list_res_size == -1)
- return;
+ {
+ g_free (list);
+ return;
+ }
attr = list;
while (list_res_size > 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]