summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authordanielsdeleo <dan@chef.io>2015-06-19 17:18:01 -0700
committerdanielsdeleo <dan@chef.io>2015-06-19 17:18:01 -0700
commit35f286035a3541eb119d91aef8c561456ef2c7e5 (patch)
treeb241173d7137314c6a2bdc2a68c2d36fd83bba02 /ext
parent92fe69e4141cc7fca07eb432c5d16791054311d6 (diff)
downloadffi-yajl-35f286035a3541eb119d91aef8c561456ef2c7e5.tar.gz
Fix uninitialized instance variable when using extuninitialized-variable-in-ext
Diffstat (limited to 'ext')
-rw-r--r--ext/ffi_yajl/ext/parser/parser.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/ffi_yajl/ext/parser/parser.c b/ext/ffi_yajl/ext/parser/parser.c
index a5d2e9a..c0b8eab 100644
--- a/ext/ffi_yajl/ext/parser/parser.c
+++ b/ext/ffi_yajl/ext/parser/parser.c
@@ -184,6 +184,7 @@ static VALUE mParser_do_yajl_parse(VALUE self, VALUE str, VALUE yajl_opts) {
unsigned char *err;
volatile CTX ctx;
+ rb_ivar_set(self, rb_intern("key"), Qnil);
rb_ivar_set(self, rb_intern("stack"), rb_ary_new());
rb_ivar_set(self, rb_intern("key_stack"), rb_ary_new());