summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-26 00:28:39 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-26 00:28:39 +0000
commit2186aeaa5cfd364a7212c0679144b3c071246332 (patch)
tree1b6c1d4498eeef06b4d315c4a95818c3fe3999dd /ext
parentf61938df01c2d4c0ab918bf9a7cc71fd5bffbcea (diff)
downloadruby-2186aeaa5cfd364a7212c0679144b3c071246332.tar.gz
ruby-2186aeaa5cfd364a7212c0679144b3c071246332.tar.xz
ruby-2186aeaa5cfd364a7212c0679144b3c071246332.zip
* ext/syck/implicit.c (syck_type_id_to_uri): should return
newly allocated memory. otherwise, type_id will be freed twice. [ruby-dev:27384] [ruby-core:6385] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/syck/implicit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/syck/implicit.c b/ext/syck/implicit.c
index d8016986b..d356faf7d 100644
--- a/ext/syck/implicit.c
+++ b/ext/syck/implicit.c
@@ -2481,7 +2481,7 @@ yy244: ++YYCURSOR;
goto yy245;
yy245:
#line 174 "implicit.re"
-{ return type_id; }
+{ return syck_strndup( type_id, strlen( type_id ) ); }
#line 2485 "<stdout>"
yy246: yych = *++YYCURSOR;
switch(yych){
@@ -2928,7 +2928,7 @@ yy264: ++YYCURSOR;
goto yy265;
yy265:
#line 172 "implicit.re"
-{ return type_id; }
+{ return syck_strndup( type_id, strlen( type_id ) ); }
#line 2932 "<stdout>"
yy266: yych = *++YYCURSOR;
switch(yych){