[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/12] migration/rdma: fix potential nullptr access in rdma_start_
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 01/12] migration/rdma: fix potential nullptr access in rdma_start_incoming_migration |
Date: |
Mon, 1 Jun 2020 19:39:53 +0100 |
From: Pan Nengyuan <pannengyuan@huawei.com>
'rdma' is NULL when taking the first error branch in
rdma_start_incoming_migration.
And it will cause a null pointer access in label 'err'. Fix that.
Fixes: 59c59c67ee6b0327ae932deb303caa47919aeb1e
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Message-Id: <20200508100755.7875-2-pannengyuan@huawei.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Note this is CID 1428762
---
migration/rdma.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/migration/rdma.c b/migration/rdma.c
index 967fda5b0c..72e8b1c95b 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -4056,7 +4056,9 @@ void rdma_start_incoming_migration(const char *host_port,
Error **errp)
return;
err:
error_propagate(errp, local_err);
- g_free(rdma->host);
+ if (rdma) {
+ g_free(rdma->host);
+ }
g_free(rdma);
g_free(rdma_return_path);
}
--
2.26.2
- Re: [PULL 04/12] hmp: Simplify qom-set, (continued)
- Re: [PULL 04/12] hmp: Simplify qom-set, David Hildenbrand, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, Dr. David Alan Gilbert, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, David Hildenbrand, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, David Hildenbrand, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, Dr. David Alan Gilbert, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, David Hildenbrand, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, Dr. David Alan Gilbert, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, David Hildenbrand, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, David Hildenbrand, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, Dr. David Alan Gilbert, 2020/06/03
[PULL 01/12] migration/rdma: fix potential nullptr access in rdma_start_incoming_migration,
Dr. David Alan Gilbert (git) <=
[PULL 05/12] virtiofsd: remove symlink fallbacks, Dr. David Alan Gilbert (git), 2020/06/01
[PULL 08/12] migration/colo.c: Use cpu_synchronize_all_states(), Dr. David Alan Gilbert (git), 2020/06/01
[PULL 06/12] migration/vmstate: Remove unnecessary MemoryRegion forward declaration, Dr. David Alan Gilbert (git), 2020/06/01
[PULL 09/12] migration/colo.c: Flush ram cache only after receiving device state, Dr. David Alan Gilbert (git), 2020/06/01
[PULL 10/12] migration/colo.c: Relaunch failover even if there was an error, Dr. David Alan Gilbert (git), 2020/06/01
[PULL 07/12] migration/colo.c: Use event instead of semaphore, Dr. David Alan Gilbert (git), 2020/06/01
[PULL 11/12] migration/colo.c: Move colo_notify_compares_event to the right place, Dr. David Alan Gilbert (git), 2020/06/01
[PULL 12/12] migration/migration.c: Fix hang in ram_save_host_page, Dr. David Alan Gilbert (git), 2020/06/01
Re: [PULL 00/12] migration/virtiofs/hmp queue, Peter Maydell, 2020/06/02