[ruby-cvs:70475] nobu:r63385 (trunk): fix potential memory leaks

nobu at ruby-lang.org nobu at ruby-lang.org
Thu May 10 02:40:04 JST 2018


nobu	2018-05-10 02:40:04 +0900 (Thu, 10 May 2018)

  New Revision: 63385

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63385

  Log:
    fix potential memory leaks
    
    * gc.c (rb_alloc_tmp_buffer_with_count): keep the order; allocate
      an empty imemo first then xmalloc, to get rid of potential
      memory leak when allocation imemo failed.
    
    * parse.y (rb_parser_malloc, rb_parser_calloc, rb_parser_realloc):
      ditto.
    
    * process.c (rb_execarg_allocate_dup2_tmpbuf): ditto.

  Modified files:
    trunk/gc.c
    trunk/parse.y
    trunk/process.c


More information about the ruby-cvs mailing list