Skip to content

Commit

Permalink
ext/libcdb/ruby_cdb_reader.c (rcdb_reader_close): [FIX] Free CDB poin…
Browse files Browse the repository at this point in the history
…ter.
  • Loading branch information
blackwinter committed Aug 7, 2012
1 parent 19e62aa commit 2452337
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
= Revision history for libcdb-ruby

== 0.0.4 [unreleased]

* Fixed leaking CDB pointer when closing reader.

== 0.0.3 [2012-04-02]

* Fixed linking error on Mac OS X. (Issue #1 reported by minaguib)
Expand Down
1 change: 1 addition & 0 deletions ext/libcdb/ruby_cdb_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ rcdb_reader_close(VALUE self) {
RCDB_READER_GET(self, cdb);
rb_iv_set(self, "closed", Qtrue);

cdb_free(cdb);
rb_io_close(rb_iv_get(self, "@io"));

return Qnil;
Expand Down

0 comments on commit 2452337

Please sign in to comment.