diff options
author | Zhang Yanfei <zhangyanfei@cn.fujitsu.com> | 2013-01-11 16:58:45 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2013-01-30 13:15:34 +0900 |
commit | 566ca8a12145196b00ad37939cfd58a97f96ba89 (patch) | |
tree | ff4b7034d73cbc3fc876e3a1fd012fd694e5fb9d | |
parent | 348896c70439534a6cef78496036dea82a93c19b (diff) |
kexec: add additional check when getting memory info
This check makes sure that we indeed get the memory information.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/kexec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kexec/kexec.c b/kexec/kexec.c index 89ec182..16c6308 100644 --- a/kexec/kexec.c +++ b/kexec/kexec.c @@ -675,7 +675,7 @@ static int my_load(const char *type, int fileind, int argc, char **argv, #endif if (get_memory_ranges(&info.memory_range, &info.memory_ranges, - info.kexec_flags) < 0) { + info.kexec_flags) < 0 || info.memory_ranges == 0) { fprintf(stderr, "Could not get memory layout\n"); return -1; } |