Commit cff9acbc by Jean-Baptiste Kempf

Fix memleak

parent 6b467b99
......@@ -119,6 +119,8 @@ dvdnav_status_t dvdnav_free_dup(dvdnav_t *this) {
pthread_mutex_destroy(&this->vm_lock);
free(this->path);
/* We leave the final freeing of the entire structure to the cache,
* because we don't know, if there are still buffers out in the wild,
* that must return first. */
......@@ -183,6 +185,7 @@ dvdnav_status_t dvdnav_open(dvdnav_t** dest, const char *path) {
fail:
pthread_mutex_destroy(&this->vm_lock);
vm_free_vm(this->vm);
free(this->path);
free(this);
return DVDNAV_STATUS_ERR;
}
......@@ -209,6 +212,8 @@ dvdnav_status_t dvdnav_close(dvdnav_t *this) {
pthread_mutex_destroy(&this->vm_lock);
free(this->path);
/* We leave the final freeing of the entire structure to the cache,
* because we don't know, if there are still buffers out in the wild,
* that must return first. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment