On 01/04/13 19:26, Eric Blake wrote:
On 01/03/2013 06:38 AM, Peter Krempa wrote:
> When the disk alignment check done while redefining an existing snapshot
> failed, the qemu driver attempted to free the existing snapshot. As in
> the cleanup path the definition of the snapshot wasn't assigned, the
> cleanup code dereferenced a NULL pointer.
>
> This patch changes the behavior on error paths while redefining snapshot
> in two ways:
>
> 1) On failure, modifications done on the snapshot definiton object are
s/definiton/definition/
> rolled back.
>
> 2) The previous definition of the data isn't freed until it's certain it
> won't be needed any more.
>
> This change avoids the segfault and additionaly the snapshot doesn't
s/additionaly/additionally/
> vanish if re-definiton fails for some reason.
s/re-definiton/redefinition/
> ---
> src/qemu/qemu_driver.c | 51 +++++++++++++++++++++ ++++++++++++++---------------
> 1 file changed, 36 insertions(+), 15 deletions(-)
>
The amount typos in my patches is really embarrassing. I should get
spell checking support for my editor :/.
ACK.
Thanks for the review.
Peter