Commit baca6f18 authored by Anthony Liguori's avatar Anthony Liguori

char-socket: fix error reporting

Right now the inet connect code tries all available addresses but until one
doesn't fail.  It passes local_err each time without clearing it from the
previous failure.  This can trigger an assert since the inet connect code
tries to set an error on an object != NULL.
Signed-off-by: default avatarAnthony Liguori <>
Signed-off-by: default avatarAmit Shah <>
Signed-off-by: default avatarAnthony Liguori <>
parent 0bc472a9
......@@ -373,6 +373,10 @@ int inet_connect_opts(QemuOpts *opts, Error **errp,
for (e = res; e != NULL; e = e->ai_next) {
if (error_is_set(errp)) {
*errp = NULL;
if (connect_state != NULL) {
connect_state->current_addr = e;
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