Details
Description
When the client calls libcouchbase_create and then later calls libcouchbase_destroy, some memory is leaked. For a client with many threads that open and close couchbase sessions, this will lead to memory exhaustion. The leak is caused by the use of strdup() in setup_boostrap_hosts(). These duplicated strings are not free'd in libcouchbase_destroy. The leak can be seen by using valgrind.
I have attached a proof of concept, and a patch with a proposed fix.
I have only tested on 1.0.2, but other versions may be affected.
I have attached a proof of concept, and a patch with a proposed fix.
I have only tested on 1.0.2, but other versions may be affected.
Activity
- All
- Comments
- Work Log
- History
- Activity
- Gerrit Reviews
Sergey Avseyev
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 1.0.4 [ 10327 ] | |
| Resolution | Fixed [ 1 ] |
Sergey Avseyev
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |