diff options
author | David Robillard <d@drobilla.net> | 2021-08-13 19:31:26 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-28 21:57:07 -0500 |
commit | 63e7e57237a79d0447b0450a7fd3148c43052299 (patch) | |
tree | b4c45eca1c208f8bd70a7a50632d423aec39e118 /tools | |
parent | 547ef6e0600b703dcd42a10622563d7b91434669 (diff) | |
download | serd-63e7e57237a79d0447b0450a7fd3148c43052299.tar.gz serd-63e7e57237a79d0447b0450a7fd3148c43052299.tar.bz2 serd-63e7e57237a79d0447b0450a7fd3148c43052299.zip |
Provide a full output stream implementation for SerdBuffer
Essentially replaces serd_buffer_sink_finish() with serd_buffer_close(), which
makes writing to a buffer consistent with writing to a file or anything else.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/serd-pipe.c | 2 | ||||
-rw-r--r-- | tools/serd-sort.c | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tools/serd-pipe.c b/tools/serd-pipe.c index 25efb54f..57392c8a 100644 --- a/tools/serd-pipe.c +++ b/tools/serd-pipe.c @@ -83,10 +83,12 @@ run(const Options opts) (st = serd_read_inputs( app.world, opts.common, app.env, opts.n_inputs, opts.inputs, sink)) || (st = serd_writer_finish(app.writer))) { + serd_sink_free(canon); serd_tool_cleanup(app); return st; } + serd_sink_free(canon); return serd_tool_cleanup(app); } diff --git a/tools/serd-sort.c b/tools/serd-sort.c index 5e71e95e..bbdfa164 100644 --- a/tools/serd-sort.c +++ b/tools/serd-sort.c @@ -95,6 +95,8 @@ run(const Options opts) opts.n_inputs, opts.inputs, inserter))) { + serd_sink_free(inserter); + serd_model_free(model); serd_tool_cleanup(app); return st; } @@ -127,6 +129,9 @@ run(const Options opts) st = serd_writer_finish(app.writer); } + serd_sink_free(inserter); + serd_model_free(model); + const SerdStatus cst = serd_tool_cleanup(app); return st ? st : cst; } |