[前][次][番号順一覧][スレッド一覧]

ruby-changes:32672

From: mame <ko1@a...>
Date: Thu, 30 Jan 2014 08:27:19 +0900 (JST)
Subject: [ruby-changes:32672] mame:r44751 (trunk): * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value.

mame	2014-01-30 08:27:14 +0900 (Thu, 30 Jan 2014)

  New Revision: 44751

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44751

  Log:
    * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value.
      [ruby-core:57599] [Bug #8978].

  Modified files:
    trunk/ChangeLog
    trunk/ext/fiddle/closure.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44750)
+++ ChangeLog	(revision 44751)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jan 30 08:26:21 2014  Yusuke Endoh  <mame@t...>
+
+	* 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@r...>
 
 	* io.c (nogvl_copy_stream_sendfile): check socket on other than
Index: ext/fiddle/closure.c
===================================================================
--- ext/fiddle/closure.c	(revision 44750)
+++ ext/fiddle/closure.c	(revision 44751)
@@ -27,7 +27,7 @@ dealloc(void * ptr) https://github.com/ruby/ruby/blob/trunk/ext/fiddle/closure.c#L27
 #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);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]