aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
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;
+ }
}