aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-12 01:44:28 +0000
committerDavid Robillard <d@drobilla.net>2011-12-12 01:44:28 +0000
commitf2373c4fd2b7688b0caca2061de41b6fe4946f7b (patch)
treef09054e124a8280046d219fbc2415dc13207d53c /src/node.c
parentd5dd73fda168592f0b293657d78625c884d19764 (diff)
downloadserd-f2373c4fd2b7688b0caca2061de41b6fe4946f7b.tar.gz
serd-f2373c4fd2b7688b0caca2061de41b6fe4946f7b.tar.bz2
serd-f2373c4fd2b7688b0caca2061de41b6fe4946f7b.zip
Reuse write context node memory where possible.
git-svn-id: http://svn.drobilla.net/serd/trunk@248 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/node.c b/src/node.c
index 02d6f493..35c294f7 100644
--- a/src/node.c
+++ b/src/node.c
@@ -143,5 +143,8 @@ SERD_API
void
serd_node_free(SerdNode* node)
{
- free((uint8_t*)node->buf);
+ if (node->buf) {
+ free((uint8_t*)node->buf);
+ node->buf = NULL;
+ }
}