summaryrefslogtreecommitdiff
path: root/ext/dl/handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl/handle.c')
-rw-r--r--ext/dl/handle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dl/handle.c b/ext/dl/handle.c
index d30105169c9..4f9f3efd033 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -131,6 +131,7 @@ rb_dlhandle_sym(VALUE self, VALUE sym)
void *handle;
const char *name;
const char *err;
+ int i;
rb_secure(2);
@@ -162,7 +163,6 @@ rb_dlhandle_sym(VALUE self, VALUE sym)
#if defined(__CYGWIN__) || defined(WIN32) || defined(__MINGW32__)
{
int len = strlen(name);
- int i;
char *name_a = (char*)xmalloc(len+2);
strcpy(name_a, name);
name_a[len] = 'A';