aboutsummaryrefslogtreecommitdiffstats
path: root/src/n3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/n3.c')
-rw-r--r--src/n3.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/n3.c b/src/n3.c
index b97b0cd0..fd00360b 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1391,6 +1391,8 @@ read_n3_statement(SerdReader* reader)
TRY_RET((ctx.graph = read_labelOrSubject(reader, ctx)));
read_ws_star(reader);
TRY_RET(read_wrappedGraph(reader, &ctx));
+ pop_node(reader, ctx.graph);
+ ctx.graph = 0;
read_ws_star(reader);
} else if (read_ws_star(reader) && peek_byte(reader) == '{') {
if (s_type == '(' || (s_type == '[' && !*ctx.flags)) {
@@ -1400,6 +1402,7 @@ read_n3_statement(SerdReader* reader)
ctx.graph = subj;
ctx.subject = subj = 0;
TRY_RET(read_wrappedGraph(reader, &ctx));
+ pop_node(reader, ctx.graph);
read_ws_star(reader);
} else if (!subj) {
ret = r_err(reader, SERD_ERR_BAD_SYNTAX, "bad subject\n");