[tracker] tracker-extract: Don't pass known-NULL pointer in PNG error paths
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: Don't pass known-NULL pointer in PNG error paths
- Date: Wed, 14 Dec 2016 19:44:38 +0000 (UTC)
commit 3bd13a7058f5f46676e0e1e854a11a42e19a50c8
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Dec 14 20:01:44 2016 +0100
tracker-extract: Don't pass known-NULL pointer in PNG error paths
The info_ptr is checked to be NULL, no need to pass it to the
png_destroy_read_struct() function. Spotted through a false "c&p
mistake" report from Coverity further down, in the error paths
where info_ptr is actually non-NULL and needs freeing.
src/tracker-extract/tracker-extract-png.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-png.c b/src/tracker-extract/tracker-extract-png.c
index 2bf13cb..95ae299 100644
--- a/src/tracker-extract/tracker-extract-png.c
+++ b/src/tracker-extract/tracker-extract-png.c
@@ -632,7 +632,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
info_ptr = png_create_info_struct (png_ptr);
if (!info_ptr) {
- png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
+ png_destroy_read_struct (&png_ptr, NULL, NULL);
tracker_file_close (f, FALSE);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]