diff options
author | Aneesh Kumar K.V | 2013-10-01 18:19:32 +0200 |
---|---|---|
committer | Alexander Graf | 2013-10-25 23:25:48 +0200 |
commit | bb6b684363e83586c90d20127b0d0a79793ab1e2 (patch) | |
tree | 4cec3e16954a626d780f0943b1b4b991fc243e30 | |
parent | target-ppc: Use #define for max slb entries (diff) | |
download | qemu-bb6b684363e83586c90d20127b0d0a79793ab1e2.tar.gz qemu-bb6b684363e83586c90d20127b0d0a79793ab1e2.tar.xz qemu-bb6b684363e83586c90d20127b0d0a79793ab1e2.zip |
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>
-rw-r--r-- | dump.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -66,7 +66,7 @@ typedef struct DumpState { uint32_t sh_info; bool have_section; bool resume; - size_t note_size; + ssize_t note_size; hwaddr memory_offset; 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->dump_info.d_machine, nr_cpus); - if (ret < 0) { + if (s->note_size < 0) { error_set(errp, QERR_UNSUPPORTED); goto cleanup; } |