aboutsummaryrefslogtreecommitdiff
path: root/device_tree.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-04-09 16:18:30 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-04-09 20:46:34 +0100
commitf151f8aca5cf5da24f6eb743a55a2233091ae532 (patch)
tree9fe159f34311d379875816838b8bc1d81a7c0877 /device_tree.c
parent4b9a21c3442530908b2863b924e7c5ea7496cc57 (diff)
migration/ram.c: Fix use-after-free in multifd_recv_unfill_packet()
Coverity points out (CID 1400442) that in this code: if (packet->pages_alloc > p->pages->allocated) { multifd_pages_clear(p->pages); multifd_pages_init(packet->pages_alloc); } we free p->pages in multifd_pages_clear() but continue to use it in the following code. We also leak memory, because multifd_pages_init() returns the pointer to a new MultiFDPages_t struct but we are ignoring its return value. Fix both of these bugs by adding the missing assignment of the newly created struct to p->pages. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-id: 20190409151830.6024-1-peter.maydell@linaro.org Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'device_tree.c')
0 files changed, 0 insertions, 0 deletions