diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/fiddle/closure.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Thu Jan 30 08:26:21 2014 Yusuke Endoh <mame@tsg.ne.jp> + + * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value. + [ruby-core:57599] [Bug #8978]. + Wed Jan 29 20:08:15 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> * io.c (nogvl_copy_stream_sendfile): check socket on other than diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c index cb0c462a08..e0f7e4b12d 100644 --- a/ext/fiddle/closure.c +++ b/ext/fiddle/closure.c @@ -27,7 +27,7 @@ dealloc(void * ptr) #if USE_FFI_CLOSURE_ALLOC ffi_closure_free(cls->pcl); #else - munmap(cls->pcl, sizeof(cls->pcl)); + munmap(cls->pcl, sizeof(*cls->pcl)); #endif if (cls->argv) xfree(cls->argv); xfree(cls); |