This is an automated email from Gerrit.

"Igor Cudnik <[email protected]>" just uploaded a new patch set to Gerrit, which 
you can find at https://review.openocd.org/c/openocd/+/9379

-- gerrit

commit bdd9221698a8a29d9f6aa12f6142f64bc03e7c9c
Author: Igor Cudnik <[email protected]>
Date:   Sun Jan 4 21:04:36 2026 +0100

    src/flash/nor/stm32f2x.c: add NULL check for stm32x_info
    
    Change-Id: Ib348a1863aee5f8ed9d1699d203cdc4c83557628
    Signed-off-by: Igor Cudnik <[email protected]>

diff --git a/src/flash/nor/stm32f2x.c b/src/flash/nor/stm32f2x.c
index 3bafde56f8..786eb062f8 100644
--- a/src/flash/nor/stm32f2x.c
+++ b/src/flash/nor/stm32f2x.c
@@ -250,8 +250,10 @@ FLASH_BANK_COMMAND_HANDLER(stm32x_flash_bank_command)
                return ERROR_COMMAND_SYNTAX_ERROR;
 
        stm32x_info = malloc(sizeof(struct stm32x_flash_bank));
+       if(!stm32x_info)
+               return ERROR_FAIL;  // Checkme: Error msg copied from 
stm32l4.c:825
        bank->driver_priv = stm32x_info;
-
+       
        stm32x_info->probed = false;
        stm32x_info->otp_unlocked = false;
        stm32x_info->user_bank_size = bank->size;

-- 

Reply via email to