From 700a0f840b51a164580c4c0afc7c8ddea50e99a1 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 24 Oct 2022 08:30:38 -0400 Subject: [PATCH] MT#55628 fix Coverity RESOURCE_LEAK warning Fixes an inconsequential mem leak (mediator would shut down after logging the error anyway) Change-Id: I6d3bdbabc70d2fbae063490479da7d9722cc08df (cherry picked from commit 838878264371c2f363a88f4c08d56850bec864f2) --- medmysql.c | 1 + 1 file changed, 1 insertion(+) diff --git a/medmysql.c b/medmysql.c index d6b868f..1ad6fb6 100644 --- a/medmysql.c +++ b/medmysql.c @@ -1696,6 +1696,7 @@ static int medmysql_flush_single_cdrs(struct medmysql_cdr_batch *batch) { unsigned long auto_id = mysql_insert_id((*def->handler_ptr)->m); if (!auto_id) { L_CRITICAL("Received zero auto-ID from SQL"); + g_free(stmt); return -1; }