diff options
| author | Anthony Liguori | 2013-03-05 18:51:16 +0100 |
|---|---|---|
| committer | Anthony Liguori | 2013-03-08 20:57:12 +0100 |
| commit | baca6f183d78a0c864a5ccc0ec64e26ba960e604 (patch) | |
| tree | 24fdd8f553c0af3a4e92ccaa7e318601c1793113 | |
| parent | hw/nand.c: correct the sense of the BUSY/READY status bit (diff) | |
| download | qemu-baca6f183d78a0c864a5ccc0ec64e26ba960e604.tar.gz qemu-baca6f183d78a0c864a5ccc0ec64e26ba960e604.tar.xz qemu-baca6f183d78a0c864a5ccc0ec64e26ba960e604.zip | |
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: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Message-id: 16c806d60aa5e9660ed7751bb4e37dcd278f97f0.1362505276.git.amit.shah@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| -rw-r--r-- | util/qemu-sockets.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index 1350cccce3..3f122965ad 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -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)) { + error_free(*errp); + *errp = NULL; + } if (connect_state != NULL) { connect_state->current_addr = e; } |
