commit 5f115e3b8fa054dfb6e59af424b0946871ca6cc0
Author: Alexander Kuleshov <[email protected]>
Date:   Wed Dec 9 00:38:12 2015 +0600

    boot0cfg: check result of malloc in read_mbr()
    
    We allocating buffer for MBR in the read_mbr() function. The malloc()
    may return NULL, so this patch checks the result of the malloc and
    exit with the error if we can't allocate memory.
    
    Besides this we close file descriptor.

Summary of changes:
 usr.sbin/boot0cfg/boot0cfg.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5f115e3b8fa054dfb6e59af424b0946871ca6cc0


-- 
DragonFly BSD source repository

Reply via email to