diff options
author | Lukas Larsson <[email protected]> | 2013-01-25 11:42:32 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2013-01-28 14:24:06 +0100 |
commit | a3d68d7ff5658308c405e55f920d2d4023f57b5e (patch) | |
tree | 10a2b2761eb2d56af937e00f81489b938d3a6ded /erts | |
parent | 1265cf07e3c4f1cf10fb2541951eae7ff35d25b4 (diff) | |
download | otp-a3d68d7ff5658308c405e55f920d2d4023f57b5e.tar.gz otp-a3d68d7ff5658308c405e55f920d2d4023f57b5e.tar.bz2 otp-a3d68d7ff5658308c405e55f920d2d4023f57b5e.zip |
Fix memory leak in driver call functionality
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index 45c2e61a6c..3ea4b24848 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -4258,9 +4258,9 @@ erts_port_call(Process* c_p, *retvalp = TUPLE2(hp, am_ok, term); hp += 3; HRelease(c_p, hp_end, hp); - if (resp_buf != &resp_buf[0] + if (resp_bufp != &resp_buf[0] && !(ret_flags & DRIVER_CALL_KEEP_BUFFER)) - driver_free(resp_buf); + driver_free(resp_bufp); BUMP_REDS(c_p, ERTS_PORT_REDS_CALL); return ERTS_PORT_OP_DONE; } |