diff options
author | Sverker Eriksson <[email protected]> | 2013-02-11 17:07:32 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2013-02-11 17:10:10 +0100 |
commit | b473a5412dc141a009189b76b5d69dc43bacbd69 (patch) | |
tree | 219c573741510316b28317b0e51be9869af55f2e /erts/emulator/drivers | |
parent | 837d81ae4d1e032e91bbc8f8a54158f5ec61c707 (diff) | |
download | otp-b473a5412dc141a009189b76b5d69dc43bacbd69.tar.gz otp-b473a5412dc141a009189b76b5d69dc43bacbd69.tar.bz2 otp-b473a5412dc141a009189b76b5d69dc43bacbd69.zip |
erts: Fix memory leak in efile_drv.c
Seems to happen with async threads and when user closes
the file explicitly before the port is closed.
Diffstat (limited to 'erts/emulator/drivers')
-rw-r--r-- | erts/emulator/drivers/common/efile_drv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c index fda6cf2e53..2279fec72a 100644 --- a/erts/emulator/drivers/common/efile_drv.c +++ b/erts/emulator/drivers/common/efile_drv.c @@ -2263,6 +2263,8 @@ file_stop(ErlDrvData e) desc->fd = FILE_FD_INVALID; desc->flags = 0; cq_execute(desc); + } else { + EF_FREE(desc); } } else { if (desc->fd != FILE_FD_INVALID) { |