summaryrefslogtreecommitdiff
path: root/ext/dl/sym.c
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-05 01:24:13 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-05 01:24:13 +0000
commit9dab5bc3b0404fe183f13c0b1c3351eab1bf257a (patch)
tree73092f18b2864c6668d7d5e65dae6f52aeb6105c /ext/dl/sym.c
parent45a08a4296b57df13190cb9065ee44974f44c7ce (diff)
Multiple call of the initialize.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/sym.c')
-rw-r--r--ext/dl/sym.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/dl/sym.c b/ext/dl/sym.c
index 7e269b7c9e..7531c7969f 100644
--- a/ext/dl/sym.c
+++ b/ext/dl/sym.c
@@ -158,6 +158,8 @@ rb_dlsym_initialize(int argc, VALUE argv[], VALUE self)
if( saddr ){
Data_Get_Struct(self, struct sym_data, data);
+ if( data->name ) free(data->name);
+ if( data->type ) free(data->type);
data->func = saddr;
data->name = sname ? strdup(sname) : 0;
data->type = stype ? strdup(stype) : 0;