Commit f6b61563 authored by Dong Anyuan's avatar Dong Anyuan

Fix Coverity Scan CID 300500 (Variable p_info going out of scope leaks the storage it points to.)

parent e5a0b98e
...@@ -383,6 +383,18 @@ Protocol__FlexPagingBufferReport * copy_paging_buffer_report(Protocol__FlexPagin ...@@ -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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment