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; }