Skip to content

Commit

Permalink
Merge branch 'fdm/fix_file_driver_memory_leak' into master-pu
Browse files Browse the repository at this point in the history
  • Loading branch information
rimmius committed Dec 21, 2012
2 parents e12e393 + 7b23281 commit 5ddf411
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions erts/emulator/drivers/common/efile_drv.c
Expand Up @@ -833,6 +833,12 @@ file_stop(ErlDrvData e)
if (desc->read_binp) {
driver_free_binary(desc->read_binp);
}
while (desc->cq_head) {
struct t_data *n = desc->cq_head->next;
void (*f)(void *) = desc->cq_head->free;
f(desc->cq_head);
desc->cq_head = n;
}
EF_FREE(desc);
}

Expand Down

0 comments on commit 5ddf411

Please sign in to comment.