Code Review
/
sim
/
e2-interface.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Fix memory leakage
[sim/e2-interface.git]
/
e2sim
/
src
/
base
/
e2sim.cpp
diff --git
a/e2sim/src/base/e2sim.cpp
b/e2sim/src/base/e2sim.cpp
index
852cbdd
..
e28cbd4
100755
(executable)
--- a/
e2sim/src/base/e2sim.cpp
+++ b/
e2sim/src/base/e2sim.cpp
@@
-76,6
+76,7
@@
void E2Sim::encode_and_send_sctp_data(E2AP_PDU_t* pdu)
data.len = e2ap_asn1c_encode_pdu(pdu, &buf);
memcpy(data.buffer, buf, min(data.len, MAX_SCTP_BUFFER));
+ if (buf) free(buf);
sctp_send_data(client_fd, data);
}