projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: trace IR, values: reset pointers to `NULL` on destruction
[babeltrace.git]
/
lib
/
values.c
diff --git
a/lib/values.c
b/lib/values.c
index d14bec8447a6473ecf8f226123ef1c4979d8c4f1..ffe289c2bdeec5d44e3466619ebfbf0090866e60 100644
(file)
--- a/
lib/values.c
+++ b/
lib/values.c
@@
-130,6
+130,7
@@
static
void bt_value_string_destroy(struct bt_value *object)
{
g_string_free(BT_VALUE_TO_STRING(object)->gstr, TRUE);
void bt_value_string_destroy(struct bt_value *object)
{
g_string_free(BT_VALUE_TO_STRING(object)->gstr, TRUE);
+ BT_VALUE_TO_STRING(object)->gstr = NULL;
}
static
}
static
@@
-140,6
+141,7
@@
void bt_value_array_destroy(struct bt_value *object)
* of putting each contained object.
*/
g_ptr_array_free(BT_VALUE_TO_ARRAY(object)->garray, TRUE);
* of putting each contained object.
*/
g_ptr_array_free(BT_VALUE_TO_ARRAY(object)->garray, TRUE);
+ BT_VALUE_TO_ARRAY(object)->garray = NULL;
}
static
}
static
@@
-151,6
+153,7
@@
void bt_value_map_destroy(struct bt_value *object)
* be destroyed anyway.
*/
g_hash_table_destroy(BT_VALUE_TO_MAP(object)->ght);
* be destroyed anyway.
*/
g_hash_table_destroy(BT_VALUE_TO_MAP(object)->ght);
+ BT_VALUE_TO_MAP(object)->ght = NULL;
}
static
}
static
This page took
0.030934 seconds
and
4
git commands to generate.