diff options
author | Chen Gang <gang.chen.5i5j@gmail.com> | 2014-07-19 09:21:46 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-07-22 12:38:17 +0200 |
commit | dc54e2525389e903cee2b847cf761b5d857f75cb (patch) | |
tree | f7f23b1edd41f18338cd5b2a08109f05d9cd25d1 /roms | |
parent | 6886867e9880830d735d8ae6f6cc63ed9eb2be0c (diff) |
kvm-all: Use 'tmpcpu' instead of 'cpu' in sub-looping to avoid 'cpu' be NULL
If kvm_arch_remove_sw_breakpoint() in CPU_FOREACH() always be fail, it
will let 'cpu' NULL. And the next kvm_arch_remove_sw_breakpoint() in
QTAILQ_FOREACH_SAFE() will get NULL parameter for 'cpu'.
And kvm_arch_remove_sw_breakpoint() can assumes 'cpu' must never be NULL,
so need define additional temporary variable for 'cpu' to avoid the case.
Cc: qemu-stable@nongnu.org
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'roms')
0 files changed, 0 insertions, 0 deletions