- **status**: review --> fixed
- **Comment**:

commit cb432c7a24078bfc870da1cc84dcba859b7ecf85 (HEAD -> develop, 
origin/develop, ticket-3398)

Author: Thien Minh Huynh <[email protected]>

Date:   Wed May 6 07:50:13 2026 +0200
 
    imm: fix realloc failure handling in XML import [#3398]

    Fix potential memory leaks in imm_loader.cc, imm_cfg.c, and

    imm_import.cc where the result of realloc() was assigned directly

    to the original pointer. If realloc() fails and returns NULL, the

    original memory is leaked.

    Use a temporary variable to hold the realloc() result, check for

    NULL, and only then assign back to the original pointer. Also add

    missing NULL checks and proper cleanup on failure paths.
 
commit b484b6237e7efe68d29c056adfa56bafa9d9ee39

Author: Thien Minh Huynh <[email protected]>

Date:   Wed May 6 04:12:49 2026 +0200
 
    amfd: add continue after avd_si_delete on standby node [#3398]

    When avd_csi_config_get returns SA_AIS_ERR_NOT_EXIST on a standby

    node, the SI is deleted but execution falls through to the else

    branch causing an unnecessary goto done2. Add continue to skip

    to the next iteration after deleting the SI.
 



---

**[tickets:#3398] Codechecker reports with HIGH severity**

**Status:** fixed
**Milestone:** 5.27.01
**Created:** Wed May 06, 2026 10:15 AM UTC by Thien Minh Huynh
**Last Updated:** Tue May 12, 2026 08:40 AM UTC
**Owner:** Thien Minh Huynh


~~~
src/amf/amfd/si.cc @ 843 cplusplus.NewDelete               HIGH Use of memory 
after it is freed                       13 clangsa    
src/imm/tools/imm_import.cc @ 1786 bugprone-suspicious-realloc-usage HIGH 
'state->objectName' may be set to null if 'realloc...  1 clang-tidy 
src/imm/tools/imm_import.cc @ 1822 bugprone-suspicious-realloc-usage HIGH 
'state->attrName' may be set to null if 'realloc' ...  1 clang-tidy 
src/imm/tools/imm_import.cc @ 1946 bugprone-suspicious-realloc-usage HIGH 
'state->attrDefaultValueBuffer' may be set to null...  1 clang-tidy 
src/imm/tools/imm_cfg.c @ 617 bugprone-suspicious-realloc-usage HIGH 
'attrValues' may be set to null if 'realloc' fails...  1 clang-tidy 
src/imm/tools/imm_cfg.c @ 1480 bugprone-suspicious-realloc-usage HIGH 'rdline' 
may be set to null if 'realloc' fails, wh...  1 clang-tidy 
src/imm/tools/imm_cfg.c @ 1490 bugprone-suspicious-realloc-usage HIGH 'rdline' 
may be set to null if 'realloc' fails, wh...  1 clang-tidy 
src/imm/immloadd/imm_loader.cc @ 1322 bugprone-suspicious-realloc-usage HIGH 
'state->objectName' may be set to null if 'realloc...  1 clang-tidy 
src/imm/immloadd/imm_loader.cc @ 1352 bugprone-suspicious-realloc-usage HIGH 
'state->attrName' may be set to null if 'realloc' ...  1 clang-tidy 
src/imm/immloadd/imm_loader.cc @ 1463 bugprone-suspicious-realloc-usage HIGH 
'state->attrDefaultValueBuffer' may be set to null...  1 clang-tidy 
~~~


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to