git: fdisk(8): check result of the getdevpath(3)

Sascha Wildner swildner at crater.dragonflybsd.org
Sat Aug 21 06:34:40 PDT 2021


commit 0141565016ac839b11601188a4b104f7f66acda8
Author: Alexander Kuleshov <kuleshovmail at gmail.com>
Date:   Mon Dec 28 17:47:58 2015 +0600

    fdisk(8): check result of the getdevpath(3)
    
    We are using the getdevpath(3) function in the fdisk.c As described
    in the manual:
    
    getdevpath() returns a pointer to a malloc()'d path on success and NULL
    on failure.  If a failure occurs errno will be set appropriately.
    
    So, we need to check the result of the getdevapth() call.

Summary of changes:
 sbin/fdisk/fdisk.c | 2 ++
 1 file changed, 2 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0141565016ac839b11601188a4b104f7f66acda8


-- 
DragonFly BSD source repository



More information about the Commits mailing list