sheepdog: fix a core dump while do auto-reconnecting
We should reinit local_err as NULL inside the while loop or g_free() will report
corrupption and abort the QEMU when sheepdog driver tries reconnecting.
This was broken in commit
356b4ca.
qemu-system-x86_64: failed to get the header, Resource temporarily unavailable
qemu-system-x86_64: Failed to connect to socket: Connection refused
qemu-system-x86_64: (null)
[xcb] Unknown sequence number while awaiting reply
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
qemu-system-x86_64: ../../src/xcb_io.c:298: poll_for_response: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Aborted (core dumped)
Cc: [email protected]
Cc: Markus Armbruster <[email protected]>
Cc: Kevin Wolf <[email protected]>
Cc: Stefan Hajnoczi <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Liu Yuan <[email protected]>
Reviewed-by: BenoƮt Canet <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>