aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/nifs/common
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-03-18 12:55:51 +0100
committerMicael Karlberg <[email protected]>2019-03-18 12:55:51 +0100
commit1c329d9b3600356caf75636df7fd40eb8221c43d (patch)
tree6b629b2c6ee16fef21a0926a4a56be0111f30eb3 /erts/emulator/nifs/common
parentd0d122c9057f6cd669d17ccefed1353be61d99ba (diff)
parent229ea2a49ac5fe072023f75ed2094dba28f4c86b (diff)
downloadotp-1c329d9b3600356caf75636df7fd40eb8221c43d.tar.gz
otp-1c329d9b3600356caf75636df7fd40eb8221c43d.tar.bz2
otp-1c329d9b3600356caf75636df7fd40eb8221c43d.zip
Merge branch 'bmk/20190315/net_memleak'
Diffstat (limited to 'erts/emulator/nifs/common')
-rw-r--r--erts/emulator/nifs/common/net_nif.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/nifs/common/net_nif.c b/erts/emulator/nifs/common/net_nif.c
index 6c91bd74bd..252aa3c835 100644
--- a/erts/emulator/nifs/common/net_nif.c
+++ b/erts/emulator/nifs/common/net_nif.c
@@ -1363,7 +1363,7 @@ ERL_NIF_TERM encode_address_infos(ErlNifEnv* env,
NDBG( ("NET", "encode_address_infos -> len: %d\r\n", len) );
if (len > 0) {
- ERL_NIF_TERM* array = MALLOC(len * sizeof(ERL_NIF_TERM)); // LEAK?
+ ERL_NIF_TERM* array = MALLOC(len * sizeof(ERL_NIF_TERM));
unsigned int i = 0;
struct addrinfo* p = addrInfo;
@@ -1374,6 +1374,7 @@ ERL_NIF_TERM encode_address_infos(ErlNifEnv* env,
}
result = MKLA(env, array, len);
+ FREE(array);
} else {
result = MKEL(env);
}