aboutsummaryrefslogtreecommitdiffstats
path: root/enum.c
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-10-01 15:02:54 +0900
committerKazuki Yamaguchi <k@rhe.jp>2017-10-06 08:47:40 +0000
commit7ca6ca4e96a93f9c23fc54320f5ff8e4ff044c8f (patch)
tree05b351fb0ad0af1a44df8ebf43f8bcbb80f559fa /enum.c
parent0ee8bb4c2a35d81dacf27be5fc42706aa891f33f (diff)
downloadruby-7ca6ca4e96a93f9c23fc54320f5ff8e4ff044c8f.tar.gz
gdbm, dbm, sdbm: prevent possible leak in #initialize
Allocate struct dbmdata before opening a file in case of out of memory. As a bonus, make ext/dbm and ext/sdbm close the currently open file if any, as ext/gdbm is doing.
Diffstat (limited to 'enum.c')
0 files changed, 0 insertions, 0 deletions