Fix Coverity Scan CID 300500 (Variable p_info going out of scope leaks the storage it points to.)
This commit is contained in:
@@ -383,6 +383,18 @@ Protocol__FlexPagingBufferReport * copy_paging_buffer_report(Protocol__FlexPagin
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
/*TODO: free memory properly*/
|
/*TODO: free memory properly*/
|
||||||
|
if (copy){
|
||||||
|
if (p_info){
|
||||||
|
for (i = 0; i < copy->n_paging_info; i++){
|
||||||
|
if (p_info[i]){
|
||||||
|
free(p_info[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free(p_info);
|
||||||
|
}
|
||||||
|
free(copy);
|
||||||
|
copy = NULL;
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user