Module: kamailio
Branch: 4.3
Commit: d7795de8f984ef88bc4c06beb3d8c210ecc8aea0
URL:
https://github.com/kamailio/kamailio/commit/d7795de8f984ef88bc4c06beb3d8c21…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com>
Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com>
Date: 2016-04-20T12:10:37+02:00
erlang: fix memory leak in debug macro
- free temporary used encoding buffer
(cherry picked from commit 2b11990929ae1d097bfb66848136bd247130263b)
---
Modified: modules/erlang/erl_helpers.h
---
Diff:
https://github.com/kamailio/kamailio/commit/d7795de8f984ef88bc4c06beb3d8c21…
Patch:
https://github.com/kamailio/kamailio/commit/d7795de8f984ef88bc4c06beb3d8c21…
---
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);