summaryrefslogtreecommitdiffstats
path: root/src/sratom.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-11-01 23:04:36 -0400
committerDavid Robillard <d@drobilla.net>2022-11-01 23:04:36 -0400
commit36fd5599e7c67f9d99046aa1570e7f0d308b7092 (patch)
tree31654f6d032be6b3f9268dd69c40abdc98eaf04c /src/sratom.c
parent079015972ee915ccff3aa55265b2568bdf0aeafd (diff)
downloadsratom-36fd5599e7c67f9d99046aa1570e7f0d308b7092.tar.gz
sratom-36fd5599e7c67f9d99046aa1570e7f0d308b7092.tar.bz2
sratom-36fd5599e7c67f9d99046aa1570e7f0d308b7092.zip
Avoid error in gcc's address sanitizer
Pretty sure this is a false positive, but it's few enough members that it doesn't hurt too much to reset them all explicitly anyway.
Diffstat (limited to 'src/sratom.c')
-rw-r--r--src/sratom.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/sratom.c b/src/sratom.c
index b834313..f9799d8 100644
--- a/src/sratom.c
+++ b/src/sratom.c
@@ -844,7 +844,15 @@ sratom_read(Sratom* sratom,
sord_node_free(world, sratom->nodes.atom_frameTime);
sord_node_free(world, sratom->nodes.atom_beatTime);
sord_node_free(world, sratom->nodes.atom_childType);
- memset(&sratom->nodes, 0, sizeof(sratom->nodes));
+
+ sratom->nodes.xsd_base64Binary = NULL;
+ sratom->nodes.rdf_value = NULL;
+ sratom->nodes.rdf_type = NULL;
+ sratom->nodes.rdf_rest = NULL;
+ sratom->nodes.rdf_first = NULL;
+ sratom->nodes.atom_beatTime = NULL;
+ sratom->nodes.atom_frameTime = NULL;
+ sratom->nodes.atom_childType = NULL;
}
LV2_Atom_Forge_Ref