Browse Source

Make sratom_free() safe to call on NULL

zrythm_meson
David Robillard 4 years ago
parent
commit
d865baf7be
  1. 7
      NEWS
  2. 6
      src/sratom.c
  3. 2
      wscript

7
NEWS

@ -1,3 +1,10 @@ @@ -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

6
src/sratom.c

@ -97,8 +97,10 @@ sratom_new(LV2_URID_Map* map) @@ -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

2
wscript

@ -10,7 +10,7 @@ from waflib.extras import autowaf @@ -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

Loading…
Cancel
Save