virStorageSourceClear: Don't leave dangling pointers behind
Imagine that this function is called twice over the same disk source. While in the first run all allocated memory is freed, not all pointers are set to NULL (e.g. def->srcpool). So when called again, these poitners are freed again resulting in double free. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> (cherry picked from commit 349badbf)
Showing
想要评论请 注册 或 登录