Skip to content

Commit

Permalink
Fix using free'd memory (was introduced in 4397181
Browse files Browse the repository at this point in the history
Change-Id: I62e886b9381f4dfafc20c4daec78566916a64e32
Reviewed-on: http://review.couchbase.org/22537
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
  • Loading branch information
avsej authored and trondn committed Nov 14, 2012
1 parent d02079c commit 96cd2b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/iofactory.c
Expand Up @@ -141,11 +141,12 @@ LIBCOUCHBASE_API
lcb_error_t lcb_destroy_io_ops(lcb_io_opt_t io)
{
if (io) {
void *dlhandle = io->dlhandle;
if (io->destructor) {
io->destructor(io);
}
if (io->dlhandle) {
dlclose(io->dlhandle);
if (dlhandle) {
dlclose(dlhandle);
}
}

Expand Down

0 comments on commit 96cd2b2

Please sign in to comment.