You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, there exists a obvious memory leak in dma.c. See the following code, the allocated resource of calloc is not freed when strdup conducts error handling.
Moreover, I have noticed one possible memory leak in the following code. At line 218, when aliased < 0 , the allocated resource by function calloc and strdup should be freed, with adding free(it->addr); free(it);?
The intent is that memory allocation failure is critical and we cannot recover from it. The code returns -1, which should signal to the caller a critical error, which should lead to exiting the process. Because we know we will exit immediately, there is no need to complicate code by free()ing structures.
If there is any code path where an error result does not lead to the process exiting, then we need to make sure that the allocations do not accumulate.
Hi, there exists a obvious memory leak in dma.c. See the following code, the allocated resource of calloc is not freed when strdup conducts error handling.
dma/dma.c
Lines 184 to 189 in 1b10f76
Moreover, I have noticed one possible memory leak in the following code. At line 218, when aliased < 0 , the allocated resource by function calloc and strdup should be freed, with adding free(it->addr); free(it);?
dma/dma.c
Lines 215 to 240 in 1b10f76
The text was updated successfully, but these errors were encountered: