summaryrefslogtreecommitdiffstats
path: root/src/sord.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-09-10 15:50:31 +0000
committerDavid Robillard <d@drobilla.net>2015-09-10 15:50:31 +0000
commit84acb7c463084f34e1e1f5ce7f094de0c560ccb3 (patch)
tree68d36e64767c4c8907dd0082559c89a2d8688343 /src/sord.c
parent1936b55421086fcd1ae4fa11cb72b55421f4753c (diff)
downloadsord-84acb7c463084f34e1e1f5ce7f094de0c560ccb3.tar.gz
sord-84acb7c463084f34e1e1f5ce7f094de0c560ccb3.tar.bz2
sord-84acb7c463084f34e1e1f5ce7f094de0c560ccb3.zip
Fix crash caused by multiple deletion of datatype nodes.
git-svn-id: http://svn.drobilla.net/sord/trunk@329 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src/sord.c')
-rw-r--r--src/sord.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sord.c b/src/sord.c
index 104cc21..78ed919 100644
--- a/src/sord.c
+++ b/src/sord.c
@@ -1062,7 +1062,7 @@ sord_new_literal_counted(SordWorld* world,
SordNode key = {
{ str, n_bytes, n_chars, flags, SERD_LITERAL }, 1, { { 0 } }
};
- key.meta.lit.datatype = datatype;
+ key.meta.lit.datatype = sord_node_copy(datatype);
memset(key.meta.lit.lang, 0, sizeof(key.meta.lit.lang));
if (lang) {
strncpy(key.meta.lit.lang, lang, sizeof(key.meta.lit.lang));