summaryrefslogtreecommitdiff
path: root/ext/dbm
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-03 02:25:37 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-03 02:25:37 +0000
commitce2bc45ae8679b40e97d6794e4e7a31b68444615 (patch)
treeb48256dafb55153e121aa5a8ae04e1711b373413 /ext/dbm
parent05ba99388d1133a99153044be67d7ae3b3dc4de5 (diff)
merge revision(s) 60042,60130,60131: [Backport #13982]
ext: adjust indent [ci skip] zlib.c: memory leak in gunzip * ext/zlib/zlib.c (zlib_gunzip): clear zstream to fix memory leak. [ruby-core:83162] [Bug #13982] zlib.c: ensure to free * ext/zlib/zlib.c (zlib_gunzip): gz0 is a structure variable on the stack, no longer valid after exit by an exception. ensure to free instead. [Bug #13982] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@62172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dbm')
-rw-r--r--ext/dbm/dbm.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c
index 07044d6f9f..734a400681 100644
--- a/ext/dbm/dbm.c
+++ b/ext/dbm/dbm.c
@@ -191,24 +191,24 @@ fdbm_initialize(int argc, VALUE *argv, VALUE obj)
}
if (dbm) {
- /*
- * History of dbm_pagfno() and dbm_dirfno() in ndbm and its compatibles.
- * (dbm_pagfno() and dbm_dirfno() is not standardized.)
- *
- * 1986: 4.3BSD provides ndbm.
- * It provides dbm_pagfno() and dbm_dirfno() as macros.
- * 1991: gdbm-1.5 provides them as functions.
- * They returns a same descriptor.
- * (Earlier releases may have the functions too.)
- * 1991: Net/2 provides Berkeley DB.
- * It doesn't provide dbm_pagfno() and dbm_dirfno().
- * 1992: 4.4BSD Alpha provides Berkeley DB with dbm_dirfno() as a function.
- * dbm_pagfno() is a macro as DBM_PAGFNO_NOT_AVAILABLE.
- * 1997: Berkeley DB 2.0 is released by Sleepycat Software, Inc.
- * It defines dbm_pagfno() and dbm_dirfno() as macros.
- * 2011: gdbm-1.9 creates a separate dir file.
- * dbm_pagfno() and dbm_dirfno() returns different descriptors.
- */
+ /*
+ * History of dbm_pagfno() and dbm_dirfno() in ndbm and its compatibles.
+ * (dbm_pagfno() and dbm_dirfno() is not standardized.)
+ *
+ * 1986: 4.3BSD provides ndbm.
+ * It provides dbm_pagfno() and dbm_dirfno() as macros.
+ * 1991: gdbm-1.5 provides them as functions.
+ * They returns a same descriptor.
+ * (Earlier releases may have the functions too.)
+ * 1991: Net/2 provides Berkeley DB.
+ * It doesn't provide dbm_pagfno() and dbm_dirfno().
+ * 1992: 4.4BSD Alpha provides Berkeley DB with dbm_dirfno() as a function.
+ * dbm_pagfno() is a macro as DBM_PAGFNO_NOT_AVAILABLE.
+ * 1997: Berkeley DB 2.0 is released by Sleepycat Software, Inc.
+ * It defines dbm_pagfno() and dbm_dirfno() as macros.
+ * 2011: gdbm-1.9 creates a separate dir file.
+ * dbm_pagfno() and dbm_dirfno() returns different descriptors.
+ */
#if defined(HAVE_DBM_PAGFNO)
rb_fd_fix_cloexec(dbm_pagfno(dbm));
#endif
@@ -217,8 +217,8 @@ fdbm_initialize(int argc, VALUE *argv, VALUE obj)
#endif
#if defined(RUBYDBM_DB_HEADER) && defined(HAVE_TYPE_DBC)
- /* Disable Berkeley DB error messages such as:
- * DB->put: attempt to modify a read-only database */
+ /* Disable Berkeley DB error messages such as:
+ * DB->put: attempt to modify a read-only database */
((DBC*)dbm)->dbp->set_errfile(((DBC*)dbm)->dbp, NULL);
#endif
}