[ruby-cvs:67536] rhe:r60355 (trunk): gdbm, dbm, sdbm: prevent memory leak in #initialize

rhe at ruby-lang.org rhe at ruby-lang.org
Sun Oct 22 16:18:54 JST 2017


rhe	2017-10-22 16:18:54 +0900 (Sun, 22 Oct 2017)

  New Revision: 60355

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

  Log:
    gdbm, dbm, sdbm: prevent memory leak in #initialize
    
    Have the allocator function allocate struct dbmdata too. #initialize
    should not call ALLOC() after opening a file since it can fail with
    NoMemoryError, leaking the opened file.

  Modified files:
    trunk/ext/dbm/dbm.c
    trunk/ext/gdbm/gdbm.c
    trunk/ext/sdbm/init.c


More information about the ruby-cvs mailing list