aboutsummaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2012-01-09 09:46:32 -0800
committerJesse Hall <jessehall@google.com>2012-01-09 09:46:32 -0800
commit04e9fbc09d517455b23903c9d5e7941a9ed59b01 (patch)
treed2ea96351ec2eb7feb1bf0f5a001c6c3e9680c7f /hw
parent4382d024a01df4888114e2e72605617371763a0d (diff)
downloadexternal_qemu-04e9fbc09d517455b23903c9d5e7941a9ed59b01.zip
external_qemu-04e9fbc09d517455b23903c9d5e7941a9ed59b01.tar.gz
external_qemu-04e9fbc09d517455b23903c9d5e7941a9ed59b01.tar.bz2
Fix emulator crash restoring pipes from snapshot
The emulator crashes when loading a goldfish pipe from snapshot if it was still in PipeConnection state when saved, since there is no service associated with the pipe. Check for service existence before dereferencing the service pointer. Change-Id: I9093bdf403fd3532e9fb6584b98994d9d4dc686c
Diffstat (limited to 'hw')
-rw-r--r--hw/goldfish_pipe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/goldfish_pipe.c b/hw/goldfish_pipe.c
index 3c076f1..97daefb 100644
--- a/hw/goldfish_pipe.c
+++ b/hw/goldfish_pipe.c
@@ -284,7 +284,7 @@ pipe_load( PipeDevice* dev, QEMUFile* file )
}
if (pipe->funcs->load) {
- pipe->opaque = pipe->funcs->load(pipe, service->opaque, pipe->args, file);
+ pipe->opaque = pipe->funcs->load(pipe, service ? service->opaque : NULL, pipe->args, file);
if (pipe->opaque == NULL) {
AFREE(pipe);
return NULL;