diff options
author | David Robillard <d@drobilla.net> | 2011-01-20 00:35:10 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-01-20 00:35:10 +0000 |
commit | fc2fe593097a523919ee71742081cbc6f3fc4c2c (patch) | |
tree | 1b504011bf2ff6406f25481464d32a29f261cfa8 /src | |
parent | e2e8e27bbdb61a44f8336c9f56cb981029cff688 (diff) | |
download | serd-fc2fe593097a523919ee71742081cbc6f3fc4c2c.tar.gz serd-fc2fe593097a523919ee71742081cbc6f3fc4c2c.tar.bz2 serd-fc2fe593097a523919ee71742081cbc6f3fc4c2c.zip |
Fix memory management on collection parsing.
git-svn-id: http://svn.drobilla.net/serd/trunk@7 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src')
-rw-r--r-- | src/reader.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/reader.c b/src/reader.c index 31392747..bf0eea11 100644 --- a/src/reader.c +++ b/src/reader.c @@ -288,6 +288,11 @@ static void pop_string(SerdReader parser, Ref ref) { if (ref) { + if (ref == parser->rdf_nil.value + || ref == parser->rdf_first.value + || ref == parser->rdf_rest.value) { + return; + } #ifdef STACK_DEBUG if (!stack_is_top_string(parser, ref)) { fprintf(stderr, "attempt to pop non-top string %s\n", deref(parser, ref)->buf); |