[tracker] tracker-needle: Fix double free
- From: JÃrg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-needle: Fix double free
- Date: Mon, 23 Jul 2012 05:49:54 +0000 (UTC)
commit d1fc94e5f4f99047cb3b934b8136e9fe125bff6e
Author: JÃrg Billeter <j bitron ch>
Date: Mon Jul 23 07:48:39 2012 +0200
tracker-needle: Fix double free
Fixes GB#680350.
src/tracker-needle/tracker-tags-view.vala | 8 ++------
src/tracker-needle/tracker-view.vala | 2 +-
2 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/tracker-needle/tracker-tags-view.vala b/src/tracker-needle/tracker-tags-view.vala
index c2d5c5d..abf4ea2 100644
--- a/src/tracker-needle/tracker-tags-view.vala
+++ b/src/tracker-needle/tracker-tags-view.vala
@@ -87,18 +87,14 @@ public class TrackerTagsView : VBox {
TRUE = 1
}
- public TrackerTagsView (List<string>? _files) {
+ public TrackerTagsView (owned List<string>? _files) {
try {
connection = Sparql.Connection.get ();
} catch (GLib.Error e) {
warning ("Could not get Sparql connection: %s", e.message);
}
- if (_files != null) {
- files = _files.copy ();
- } else {
- files = null;
- }
+ files = (owned) _files;
cancellable = new Cancellable ();
diff --git a/src/tracker-needle/tracker-view.vala b/src/tracker-needle/tracker-view.vala
index 8ffa810..a2626cd 100644
--- a/src/tracker-needle/tracker-view.vala
+++ b/src/tracker-needle/tracker-view.vala
@@ -548,7 +548,7 @@ public class Tracker.View : ScrolledWindow {
List<string> files = null;
files.prepend (uri);
- VBox vbox = new TrackerTagsView (files);
+ VBox vbox = new TrackerTagsView ((owned) files);
var content = dialog.get_content_area () as Box;
content.pack_start (vbox, true, true, 6);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]