Module: kamailio
Branch: master
Commit: 6ac4148d3d7e6ea772438b7c5b42807175e5888a
URL:
https://github.com/kamailio/kamailio/commit/6ac4148d3d7e6ea772438b7c5b42807…
Author: Xenofon Karamanos <xk(a)gilawa.com>
Committer: Xenofon Karamanos <xenakiskaramanos(a)gmail.com>
Date: 2024-02-16T12:20:44+02:00
file_out: Free message when done
---
Modified: src/modules/file_out/file_out.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6ac4148d3d7e6ea772438b7c5b42807…
Patch:
https://github.com/kamailio/kamailio/commit/6ac4148d3d7e6ea772438b7c5b42807…
---
diff --git a/src/modules/file_out/file_out.c b/src/modules/file_out/file_out.c
index 5815d61cb63..d6fdd51ce9d 100644
--- a/src/modules/file_out/file_out.c
+++ b/src/modules/file_out/file_out.c
@@ -207,6 +207,14 @@ static void fo_log_writer_process(int rank)
if(fflush(out) < 0) {
LM_ERR("Failed to flush file with err {%s}\n", strerror(errno));
}
+
+ if(log_message.message != NULL) {
+ if(log_message.message->s != NULL) {
+ shm_free(log_message.message->s);
+ }
+ shm_free(log_message.message);
+ log_message.message = NULL;
+ }
}
}