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

This commit is contained in:
Dong Anyuan
2019-05-28 21:10:25 +09:00
parent e5a0b98ee4
commit f6b615636f
@@ -383,6 +383,18 @@ Protocol__FlexPagingBufferReport * copy_paging_buffer_report(Protocol__FlexPagin
error:
/*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;
}