1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

ext/dl, ext/fiddle: fix memory leak

* ext/dl/cptr.c (dlptr_free), ext/dl/handle.c (dlhandle_free),
  ext/fiddle/handle.c (fiddle_handle_free),
  ext/fiddle/pointer.c (fiddle_ptr_free): fix memory leak.
  based on the patch Heesob Park at [ruby-dev:48021] [Bug #9599].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-03-08 04:46:57 +00:00
parent 119d66232d
commit ff84a6a2e7
5 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,10 @@
Sat Mar 8 13:46:40 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/dl/cptr.c (dlptr_free), ext/dl/handle.c (dlhandle_free),
ext/fiddle/handle.c (fiddle_handle_free),
ext/fiddle/pointer.c (fiddle_ptr_free): fix memory leak.
based on the patch Heesob Park at [ruby-dev:48021] [Bug #9599].
Sat Mar 8 13:30:39 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* process.c (obj2uid, obj2gid): now getpwnam_r() and getgrnam_r()

View file

@ -49,6 +49,7 @@ dlptr_free(void *ptr)
(*(data->free))(data->ptr);
}
}
xfree(ptr);
}
static size_t

View file

@ -38,6 +38,7 @@ dlhandle_free(void *ptr)
if( dlhandle->ptr && dlhandle->open && dlhandle->enable_close ){
dlclose(dlhandle->ptr);
}
xfree(ptr);
}
static size_t

View file

@ -40,6 +40,7 @@ fiddle_handle_free(void *ptr)
if( fiddle_handle->ptr && fiddle_handle->open && fiddle_handle->enable_close ){
dlclose(fiddle_handle->ptr);
}
xfree(ptr);
}
static size_t

View file

@ -65,6 +65,7 @@ fiddle_ptr_free(void *ptr)
(*(data->free))(data->ptr);
}
}
xfree(ptr);
}
static size_t