mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-22 18:05:10 +00:00
restore: fix "Defect type: UNINIT"
Static code analysis reported:
1. criu/cr-restore.c:2438:2: var_decl: Declaring variable "end_vma"
without initializer.
4. criu/cr-restore.c:2451:5: assign: Assigning: "s_vma" = "&end_vma",
which points to uninitialized data.
7. criu/cr-restore.c:2449:4: uninit_use: Using uninitialized value
"s_vma->list.next".
This tries to fix it by initializing the variable.
Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
parent
bf82389de3
commit
09bb362664
1 changed files with 1 additions and 0 deletions
|
|
@ -2440,6 +2440,7 @@ static long restorer_get_vma_hint(struct list_head *tgt_vma_list, struct list_he
|
|||
|
||||
end_vma.e = &end_e;
|
||||
end_e.start = end_e.end = kdat.task_size;
|
||||
INIT_LIST_HEAD(&end_vma.list);
|
||||
|
||||
s_vma = list_first_entry(self_vma_list, struct vma_area, list);
|
||||
t_vma = list_first_entry(tgt_vma_list, struct vma_area, list);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue