summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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));