From 84acb7c463084f34e1e1f5ce7f094de0c560ccb3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 10 Sep 2015 15:50:31 +0000 Subject: Fix crash caused by multiple deletion of datatype nodes. git-svn-id: http://svn.drobilla.net/sord/trunk@329 3d64ff67-21c5-427c-a301-fe4f08042e5a --- NEWS | 5 +++-- src/sord.c | 2 +- wscript | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 65ea37e..9c00ebe 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,9 @@ -sord (0.13.0) unstable; +sord (0.13.1) unstable; * Reduce memory usage and increase performance with a better data structure * Add sord_erase() for erasing statements via an iterator * Fix bugs with stores that contain both graphs and default graph statements + * Fix crash caused by multiple deletion of datatype nodes * Fix compilation on compilers that do not support -pthread flag * Fix minor memory leak in sordi * sord_validate: More extensive validation, including cardinality, @@ -10,7 +11,7 @@ sord (0.13.0) unstable; * This release does not break the ABI, but the semantics of iterators has changed: any modification to a model invalidates iterators on that model - -- David Robillard Thu, 10 Sep 2015 11:46:40 -0400 + -- David Robillard Thu, 10 Sep 2015 11:48:51 -0400 sord (0.12.2) stable; 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)); diff --git a/wscript b/wscript index 24c67fd..3fb2cf4 100644 --- a/wscript +++ b/wscript @@ -10,7 +10,7 @@ import waflib.extras.autowaf as autowaf # major increment <=> incompatible changes # minor increment <=> compatible changes (additions) # micro increment <=> no interface changes -SORD_VERSION = '0.13.0' +SORD_VERSION = '0.13.1' SORD_MAJOR_VERSION = '0' # Mandatory waf variables -- cgit v1.2.1