Skip to content

Commit

Permalink
MB-7306 Fix to the memory leak in lookup_callback()
Browse files Browse the repository at this point in the history
Change-Id: Id7d73a09c55d965405aae4d50ce2f9d63057e3ba
Reviewed-on: http://review.couchbase.org/22966
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Jin Lim <jin@couchbase.com>
Reviewed-by: Aaron Miller <apage43@ninjawhale.com>
  • Loading branch information
chiyoung authored and Farshid Ghods committed Dec 1, 2012
1 parent b5937c4 commit 08577b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/couch_db.c
Expand Up @@ -603,10 +603,12 @@ static couchstore_error_t lookup_callback(couchfile_lookup_request *rq,
}

if ((context->options & COUCHSTORE_DELETES_ONLY) && docinfo->deleted == 0) {
couchstore_free_docinfo(docinfo);
return COUCHSTORE_SUCCESS;
}

if ((context->options & COUCHSTORE_NO_DELETES) && docinfo->deleted == 1) {
couchstore_free_docinfo(docinfo);
return COUCHSTORE_SUCCESS;
}

Expand Down

0 comments on commit 08577b1

Please sign in to comment.