From bba664d1d23d93aa4546db73d5b418c901718f7c Mon Sep 17 00:00:00 2001
From: Nick Schermer <nick@xfce.org>
Date: Thu, 1 Nov 2012 21:07:40 +0100
Subject: [PATCH] Unset value after inserting to the array.

---
 thunar/thunar-simple-job.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/thunar/thunar-simple-job.c b/thunar/thunar-simple-job.c
index 3ab3e5465..3fe9bd3c2 100644
--- a/thunar/thunar-simple-job.c
+++ b/thunar/thunar-simple-job.c
@@ -200,6 +200,10 @@ thunar_simple_job_launch (ThunarSimpleJobFunc func,
         }
 
       g_array_insert_val (simple_job->param_values, n, value);
+
+      /* manually unset the value, g_value_unset doesn't work
+       * because we don't want to free the data */
+      memset (&value, 0, sizeof (GValue));
     }
   va_end (var_args);
 
-- 
GitLab