disks: Check fopen return value.
This commit is contained in:
parent
afc9e4cba2
commit
4acdba7ad6
|
@ -50,6 +50,9 @@ disk_mount_point_get(const char *path)
|
|||
char *start, *end;
|
||||
FILE *f = fopen("/proc/mounts", "r");
|
||||
|
||||
if (!f)
|
||||
return NULL;
|
||||
|
||||
while ((fgets(buf, sizeof(buf), f)) != NULL)
|
||||
{
|
||||
start = &buf[0];
|
||||
|
|
Loading…
Reference in New Issue