summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-12-27 14:17:18 -0500
committerDavid Robillard <d@drobilla.net>2018-12-27 14:17:27 -0500
commitd865baf7be8ca171ec2c2e142f7e15e1e76d82bf (patch)
tree7bfce9474fb10764a10aa9cd9761f57858f3dd06
parentfb88a51162097d1117ea8b96958aa98e2fcbf2a3 (diff)
downloadsratom-d865baf7be8ca171ec2c2e142f7e15e1e76d82bf.tar.gz
sratom-d865baf7be8ca171ec2c2e142f7e15e1e76d82bf.tar.bz2
sratom-d865baf7be8ca171ec2c2e142f7e15e1e76d82bf.zip
Make sratom_free() safe to call on NULL
-rw-r--r--NEWS7
-rw-r--r--src/sratom.c6
-rw-r--r--wscript2
3 files changed, 12 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index b7501d9..07cc4dc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+sratom (0.6.3) unstable;
+
+ * Various minor code cleanups
+ * Make sratom_free() safe to call on NULL
+
+ -- David Robillard <d@drobilla.net> Thu, 27 Dec 2018 14:17:06 -0500
+
sratom (0.6.2) stable;
* Various minor code cleanups
diff --git a/src/sratom.c b/src/sratom.c
index 7b00557..f3c7be9 100644
--- a/src/sratom.c
+++ b/src/sratom.c
@@ -97,8 +97,10 @@ sratom_new(LV2_URID_Map* map)
void
sratom_free(Sratom* sratom)
{
- serd_node_free(&sratom->base_uri);
- free(sratom);
+ if (sratom) {
+ serd_node_free(&sratom->base_uri);
+ free(sratom);
+ }
}
void
diff --git a/wscript b/wscript
index 4b20f22..239d7dc 100644
--- a/wscript
+++ b/wscript
@@ -10,7 +10,7 @@ from waflib.extras import autowaf
# major increment <=> incompatible changes
# minor increment <=> compatible changes (additions)
# micro increment <=> no interface changes
-SRATOM_VERSION = '0.6.2'
+SRATOM_VERSION = '0.6.3'
SRATOM_MAJOR_VERSION = '0'
# Mandatory waf variables