From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 4/5] migration: Don't try to set *errp directly
Date: Thu, 8 Jun 2017 15:21:41 +0100 [thread overview]
Message-ID: <20170608142140.GC2082@work-vm> (raw)
In-Reply-To: <20170608133906.12737-5-ehabkost@redhat.com>
* Eduardo Habkost (ehabkost@redhat.com) wrote:
> Assigning directly to *errp is not valid, as errp may be NULL,
> &error_fatal, or &error_abort. Use error_propagate() instead.
>
> Cc: Juan Quintela <quintela@redhat.com>
> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> migration/migration.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index 48c94c9ca1..5a8bef3ef5 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -1188,7 +1188,7 @@ bool migration_is_blocked(Error **errp)
> }
>
> if (migration_blockers) {
> - *errp = error_copy(migration_blockers->data);
> + error_propagate(errp, error_copy(migration_blockers->data));
> return true;
> }
if errp is NULL doesn't that leak the error_copy ?
Dave
>
> --
> 2.11.0.259.g40922b1
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2017-06-08 14:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 13:39 [Qemu-devel] [PATCH 0/5] Error handling cleanup and fixes Eduardo Habkost
2017-06-08 13:39 ` [Qemu-devel] [PATCH 1/5] xilinx: Fix error handling Eduardo Habkost
2017-06-08 16:29 ` Alistair Francis
2017-07-05 11:44 ` Markus Armbruster
2017-07-06 14:08 ` Eduardo Habkost
2017-07-06 14:45 ` Markus Armbruster
2017-06-08 13:39 ` [Qemu-devel] [PATCH 2/5] block: Don't try to set *errp directly Eduardo Habkost
2017-06-08 15:04 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2017-07-05 11:50 ` [Qemu-devel] " Markus Armbruster
2017-06-08 13:39 ` [Qemu-devel] [PATCH 3/5] websock: " Eduardo Habkost
2017-06-08 15:46 ` Manos Pitsidianakis
2017-07-05 11:53 ` Markus Armbruster
2017-06-08 13:39 ` [Qemu-devel] [PATCH 4/5] migration: " Eduardo Habkost
2017-06-08 14:18 ` Juan Quintela
2017-06-08 14:21 ` Dr. David Alan Gilbert [this message]
2017-06-08 14:22 ` Dr. David Alan Gilbert
2017-06-08 13:39 ` [Qemu-devel] [PATCH 5/5] vnc: No need for Error** parameter at vnc_client_io_error() Eduardo Habkost
2017-06-08 15:17 ` Eric Blake
2017-06-08 16:05 ` Eduardo Habkost
2017-06-08 17:44 ` Eduardo Habkost
2017-06-08 21:22 ` Eric Blake
2017-06-08 15:18 ` [Qemu-devel] [PATCH 0/5] Error handling cleanup and fixes Eric Blake
2017-07-05 11:56 ` Markus Armbruster
2017-07-06 15:10 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170608142140.GC2082@work-vm \
--to=dgilbert@redhat.com \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).