summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Fuhrmannek2021-08-12 11:13:51 +0200
committerjvoisin2021-08-14 18:38:51 +0200
commit741cab4456f4cf1b12ef40a616797115b547f7d2 (patch)
tree1c76320f70ec57cc2ae7749d4b7c6f658e7a9c15 /src
parent133662d6ea962517f0284b758c7ace599a921d7c (diff)
missing efree in sp_log_msgf
Diffstat (limited to 'src')
-rw-r--r--src/sp_utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c
index 3d2dfcc..b78f7b1 100644
--- a/src/sp_utils.c
+++ b/src/sp_utils.c
@@ -55,6 +55,7 @@ void sp_log_msgf(char const* restrict feature, int level, int type,
55 syslog(syslog_level, "[snuffleupagus][%s][%s][%s] %s in %s on line %d", 55 syslog(syslog_level, "[snuffleupagus][%s][%s][%s] %s in %s on line %d",
56 client_ip, feature, logtype, msg, error_filename, error_lineno); 56 client_ip, feature, logtype, msg, error_filename, error_lineno);
57 closelog(); 57 closelog();
58 efree(msg);
58 if (type == SP_TYPE_DROP) { 59 if (type == SP_TYPE_DROP) {
59 zend_bailout(); 60 zend_bailout();
60 } 61 }
@@ -64,6 +65,7 @@ void sp_log_msgf(char const* restrict feature, int level, int type,
64 default: 65 default:
65 zend_error(level, "[snuffleupagus][%s][%s][%s] %s", client_ip, feature, 66 zend_error(level, "[snuffleupagus][%s][%s][%s] %s", client_ip, feature,
66 logtype, msg); 67 logtype, msg);
68 efree(msg);
67 break; 69 break;
68 } 70 }
69} 71}