summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2010-04-27 23:55:00 +0200
committerFlorian Frank <flori@ping.de>2010-04-28 00:00:03 +0200
commit58e3f2b9e0120b388fc4160ef0271f0a674b69e3 (patch)
tree822a6bb25e9239cfdac7ea7197bf000943b16889
parent4cf1ea0ddd5a64ea202007128302e791c521f920 (diff)
downloadjson-58e3f2b9e0120b388fc4160ef0271f0a674b69e3.tar.gz
Free the buffer content as well.
Forgot to change back to the regular fbuffer_free function after ending the nocopying experiment. This of course caused a memory leak.
-rw-r--r--ext/json/ext/generator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/ext/generator.c b/ext/json/ext/generator.c
index 043be60..b398cac 100644
--- a/ext/json/ext/generator.c
+++ b/ext/json/ext/generator.c
@@ -921,7 +921,7 @@ static VALUE cState_partial_generate(VALUE self, VALUE obj, VALUE depth)
generate_json(buffer, self, state, obj, NIL_P(depth) ? 0 : FIX2INT(depth));
result = rb_str_new(FBUFFER_PAIR(buffer));
- fbuffer_free_only_buffer(buffer);
+ fbuffer_free(buffer);
FORCE_UTF8(result);
return result;
}