[sr-dev] git:master:2b119909: erlang: fix memory leak in debug macro

Seudin Kasumovic seudin.kasumovic at gmail.com
Wed Apr 20 12:04:56 CEST 2016


Module: kamailio
Branch: master
Commit: 2b11990929ae1d097bfb66848136bd247130263b
URL: https://github.com/kamailio/kamailio/commit/2b11990929ae1d097bfb66848136bd247130263b

Author: Seudin Kasumovic <seudin.kasumovic at gmail.com>
Committer: Seudin Kasumovic <seudin.kasumovic at gmail.com>
Date: 2016-04-20T12:00:13+02:00

erlang: fix memory leak in debug macro

- free temporary used encoding buffer

---

Modified: modules/erlang/erl_helpers.h

---

Diff:  https://github.com/kamailio/kamailio/commit/2b11990929ae1d097bfb66848136bd247130263b.diff
Patch: https://github.com/kamailio/kamailio/commit/2b11990929ae1d097bfb66848136bd247130263b.patch

---

diff --git a/modules/erlang/erl_helpers.h b/modules/erlang/erl_helpers.h
index 2aed063..fa8fdc5 100644
--- a/modules/erlang/erl_helpers.h
+++ b/modules/erlang/erl_helpers.h
@@ -141,6 +141,7 @@ do { \
 	ei_s_print_term(&pbuf, pidbuf.buff, &i); \
 	ei_x_print_reg_msg(buf, pbuf, send); \
 	free(pbuf); \
+	ei_x_free(&pidbuf); \
 } while(0)
 
 int ei_decode_strorbin(char *buf, int *index, int maxlen, char *dst);




More information about the sr-dev mailing list