disks: Check fopen return value.

edi-0.5
Alastair Poole 4 years ago
parent afc9e4cba2
commit 4acdba7ad6
  1. 3
      src/disks.c

@ -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…
Cancel
Save