From c67e7c51ff4faacbf78d83b494d805b6278c6f59 Mon Sep 17 00:00:00 2001 From: AbelPau Date: Mon, 20 May 2024 18:06:23 +0200 Subject: [PATCH] Fixing chromium bug 68809 correctly When first feature fails, the creation of the table MMDB has to be destroyed --- ogr/ogrsf_frmts/miramon/mm_wrlayr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ogr/ogrsf_frmts/miramon/mm_wrlayr.c b/ogr/ogrsf_frmts/miramon/mm_wrlayr.c index c0d30b761513..51899ba919cf 100644 --- a/ogr/ogrsf_frmts/miramon/mm_wrlayr.c +++ b/ogr/ogrsf_frmts/miramon/mm_wrlayr.c @@ -4409,7 +4409,10 @@ static int MMCreateRecordDBF(struct MiraMonVectLayerInfo *hMiraMonLayer, if (hMiraMonLayer->TopHeader.nElemCount == 0) { if (MMCreateMMDB(hMiraMonLayer, nullptr)) + { + MMDestroyMMDB(hMiraMonLayer); return MM_FATAL_ERROR_WRITING_FEATURES; + } } result = MMAddDBFRecordToMMDB(hMiraMonLayer, hMMFeature);