diff --git a/daemon/dtmf.c b/daemon/dtmf.c index cfc1d3f60..82fd6c7d7 100644 --- a/daemon/dtmf.c +++ b/daemon/dtmf.c @@ -82,6 +82,7 @@ int dtmf_event(struct media_packet *mp, str *payload, int clockrate) { dtmflog(buf); if (dtmf_log_sock.family) send(dtmf_log_sock.fd, buf->str, buf->len, 0); + g_string_free(buf, TRUE); ret = 1; // END event } diff --git a/daemon/log.c b/daemon/log.c index 56f48ffbe..57ad53bc5 100644 --- a/daemon/log.c +++ b/daemon/log.c @@ -125,7 +125,6 @@ void dtmflog(GString *s) { if (_log_facility_dtmf) { syslog(LOG_INFO | _log_facility_dtmf, "%s", s->str); } - g_string_free(s, TRUE); }