Re: [PATCH] examples/ntb: fix the heap allocation check

2025-07-09 Thread Thomas Monjalon
21/05/2025 19:23, Bing Zhao: > In some rare case, the libc memory heap allocation may fail and > return NULL pointer. Before accessing the memory via the pointer, > the NULL pointer check should be done to ensure the code locates > in the safe side and no crash. > > Some newer GCC version will che

[PATCH] examples/ntb: fix the heap allocation check

2025-05-21 Thread Bing Zhao
In some rare case, the libc memory heap allocation may fail and return NULL pointer. Before accessing the memory via the pointer, the NULL pointer check should be done to ensure the code locates in the safe side and no crash. Some newer GCC version will check this by default and report warning on