[tracker: 6/21] tests/libtracker-sparql: Avoid memory corruption
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker: 6/21] tests/libtracker-sparql: Avoid memory corruption
- Date: Sun, 17 Feb 2019 20:43:24 +0000 (UTC)
commit 0ab54d31d15a10052fb020c7262b2cb92f6c8fe9
Author: Andrea Azzarone <andrea azzarone canonical com>
Date: Fri Jan 18 18:57:05 2019 +0000
tests/libtracker-sparql: Avoid memory corruption
Use g_value_set_static_string instead of g_value_set_string to avoid memory
corruption.
tests/libtracker-sparql/tracker-resource-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/libtracker-sparql/tracker-resource-test.c b/tests/libtracker-sparql/tracker-resource-test.c
index 4c86fe865..4b616b947 100644
--- a/tests/libtracker-sparql/tracker-resource-test.c
+++ b/tests/libtracker-sparql/tracker-resource-test.c
@@ -73,7 +73,7 @@ test_resource_get_set_gvalue (void)
resource = tracker_resource_new ("http://example.com/resource");
g_value_init (&value, G_TYPE_STRING);
- g_value_set_string (&value, "xyzzy");
+ g_value_set_static_string (&value, "xyzzy");
tracker_resource_set_gvalue (resource, "http://example.com/0", &value);
list = tracker_resource_get_values (resource, "http://example.com/0");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]