cpu: Fix qemu_get_cpu() to return NULL if CPU not found
authorIgor Mammedov <imammedo@redhat.com>
Thu, 7 Mar 2013 18:12:43 +0000 (19:12 +0100)
committerAndreas Färber <afaerber@suse.de>
Tue, 12 Mar 2013 09:35:53 +0000 (10:35 +0100)
commitd76fddaeeec674cab4802b585db6c9fb3a0066dc
treeefe034b8e187448df93698f6bc30999fae9be8e8
parentfe3cc14fd83e0c8f376d849ccd0fc3433388442d
cpu: Fix qemu_get_cpu() to return NULL if CPU not found

Commit 55e5c2850 breaks CPU not found return value, and returns
CPU corresponding to the last non NULL env.
Fix it by returning CPU only if env is not NULL, otherwise CPU is
not found and function should return NULL.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
exec.c