diff options
author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-20 03:34:39 +0000 |
---|---|---|
committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-20 03:34:39 +0000 |
commit | fb7f646086311493502a172b09fcfd17f51f6d0f (patch) | |
tree | 4eb503b78ac5f2a9523e700a040ceb29027b7449 /ext | |
parent | e4413741de74c61f15a8c735be17e96c825c4479 (diff) | |
download | ruby-fb7f646086311493502a172b09fcfd17f51f6d0f.tar.gz |
* ext/syck/rubyext.c (syck_node_transform): ruby object holding
explicitly freed SyckNode caused SEGV. [ruby-dev:28067]
... I think syck GC problem was solved now!
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/syck/rubyext.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c index 8f8474aaff..52cda8fffd 100644 --- a/ext/syck/rubyext.c +++ b/ext/syck/rubyext.c @@ -1783,7 +1783,7 @@ syck_node_transform( self ) SyckNode *n; SyckNode *orig_n; Data_Get_Struct(self, SyckNode, orig_n); - t = Data_Wrap_Struct( cNode, syck_node_mark, NULL, 0 ); + t = Data_Wrap_Struct( cNode, syck_node_mark, syck_free_node, 0 ); switch (orig_n->kind) { @@ -1824,9 +1824,7 @@ syck_node_transform( self ) n->anchor = syck_strndup( orig_n->anchor, strlen( orig_n->anchor ) ); } n->id = t; - t = rb_funcall( oDefaultResolver, s_node_import, 1, t ); - syck_free_node( n ); - return t; + return rb_funcall( oDefaultResolver, s_node_import, 1, t ); } /* |