fdisk(8): check result of the getdevpath(3)
authorAlexander Kuleshov <kuleshovmail@gmail.com>
Mon, 28 Dec 2015 11:47:58 +0000 (17:47 +0600)
committerSascha Wildner <saw@online.de>
Sat, 21 Aug 2021 12:57:18 +0000 (14:57 +0200)
commit0141565016ac839b11601188a4b104f7f66acda8
treeac55ea6db6aa3939cfac2e22467c869bb149fa95
parent073d5c5b0bbc5dc1e3f565f8b91cf6d7830d99ec
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.
sbin/fdisk/fdisk.c