Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
loader: fix page fault at /init scan
scandir() syscall can fail returning -1 , if e.g. rootfs was not mounted. In that case subsequent free() call try to deallocate some garbage pointer in namelist variable, leading to page faults. Initialize namelist to nullptr so that free() always gets valid pointer value. Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com> Message-Id: <1486655734-4431-1-git-send-email-sergiy.kibrik@globallogic.com>
- Loading branch information