diff options
author | David Robillard <d@drobilla.net> | 2019-04-14 11:11:24 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-04-14 11:18:00 +0200 |
commit | ac237a888cbd2ffe8446adc8a51482e603ca3765 (patch) | |
tree | d5521f5993fe668e446fac316fa447e12ee3d749 /src/state.c | |
parent | 1a80c081cc2f3bf38f01512734c0001e4a1d295e (diff) | |
download | lilv-ac237a888cbd2ffe8446adc8a51482e603ca3765.tar.gz lilv-ac237a888cbd2ffe8446adc8a51482e603ca3765.tar.bz2 lilv-ac237a888cbd2ffe8446adc8a51482e603ca3765.zip |
Fix Windows cross-library malloc/free errors
Diffstat (limited to 'src/state.c')
-rw-r--r-- | src/state.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/state.c b/src/state.c index 2b6b113..3841c75 100644 --- a/src/state.c +++ b/src/state.c @@ -618,7 +618,7 @@ new_state_from_model(LilvWorld* world, sord_node_free(world->world, state_node); sord_node_free(world->world, statep); - free((void*)chunk.buf); + serd_free((void*)chunk.buf); sratom_free(sratom); if (state->props.props) { @@ -1153,7 +1153,10 @@ lilv_state_to_string(LilvWorld* world, serd_writer_free(writer); serd_env_free(env); - return (char*)serd_chunk_sink_finish(&chunk); + char* str = (char*)serd_chunk_sink_finish(&chunk); + char* result = lilv_strdup(str); + serd_free(str); + return result; } static void |