mirror of
https://git.proxmox.com/git/qemu
synced 2025-07-27 14:48:46 +00:00
dump-guest-memory: Check for the correct return value
We should check for error with s->note_size Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
d83af16786
commit
bb6b684363
4
dump.c
4
dump.c
@ -66,7 +66,7 @@ typedef struct DumpState {
|
|||||||
uint32_t sh_info;
|
uint32_t sh_info;
|
||||||
bool have_section;
|
bool have_section;
|
||||||
bool resume;
|
bool resume;
|
||||||
size_t note_size;
|
ssize_t note_size;
|
||||||
hwaddr memory_offset;
|
hwaddr memory_offset;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
@ -765,7 +765,7 @@ static int dump_init(DumpState *s, int fd, bool paging, bool has_filter,
|
|||||||
|
|
||||||
s->note_size = cpu_get_note_size(s->dump_info.d_class,
|
s->note_size = cpu_get_note_size(s->dump_info.d_class,
|
||||||
s->dump_info.d_machine, nr_cpus);
|
s->dump_info.d_machine, nr_cpus);
|
||||||
if (ret < 0) {
|
if (s->note_size < 0) {
|
||||||
error_set(errp, QERR_UNSUPPORTED);
|
error_set(errp, QERR_UNSUPPORTED);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user