[longomatch] Copy the string before adding it to the list



commit 66bebd6fa57cdee00931d56296f69b81d045500e
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Wed Jun 2 20:55:58 2010 +0200

    Copy the string before adding it to the list

 libcesarplayer/src/gst-camera-capturer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libcesarplayer/src/gst-camera-capturer.c b/libcesarplayer/src/gst-camera-capturer.c
index ef0ab38..20476e1 100644
--- a/libcesarplayer/src/gst-camera-capturer.c
+++ b/libcesarplayer/src/gst-camera-capturer.c
@@ -1331,7 +1331,7 @@ gst_camera_capturer_enum_devices (gchar * device_name)
     goto finish;
   for (i = 0; i < va->n_values; ++i) {
     GValue *v = g_value_array_get_nth (va, i);
-    list = g_list_append (list, g_value_get_string (v));
+    list = g_list_append (list, g_strdup(g_value_get_string (v)));
   }
   g_value_array_free (va);
 



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