[tracker/rss-enclosures] libtracker-client: Don't check for NULL before calling g_free()



commit bc645061cb117c067c2ee1a27a111f5976db314b
Author: Martyn Russell <martyn lanedo com>
Date:   Tue Jun 22 14:27:46 2010 +0100

    libtracker-client: Don't check for NULL before calling g_free()

 src/libtracker-client/tracker.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-client/tracker.c b/src/libtracker-client/tracker.c
index a22138b..7396cb7 100644
--- a/src/libtracker-client/tracker.c
+++ b/src/libtracker-client/tracker.c
@@ -1715,7 +1715,7 @@ tracker_resources_sparql_query (TrackerClient  *client,
  *
  * Since: 0.9
  **/
-TrackerResultIterator*
+TrackerResultIterator *
 tracker_resources_sparql_query_iterate (TrackerClient  *client,
                                         const gchar    *query,
                                         GError        **error)
@@ -1860,9 +1860,7 @@ tracker_result_iterator_free (TrackerResultIterator *iterator)
 	g_ptr_array_foreach (iterator->results, (GFunc) g_free, NULL);
 	g_ptr_array_free (iterator->results, TRUE);
 #else  /* HAVE_DBUS_FD_PASSING */
-	if (iterator->buffer) {
-		g_free (iterator->buffer);
-	}
+	g_free (iterator->buffer);
 	g_slice_free (TrackerResultIterator, iterator);
 #endif /* HAVE_DBUS_FD_PASSING */
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]