mirror of
https://github.com/opnsense/src.git
synced 2026-04-28 17:49:22 -04:00
getnetid() crashes if no /etc/netid file is present (it tries to fclose()
a FILE * handle that wasn't really open).
This commit is contained in:
parent
18d5819376
commit
f7cf1c1d14
1 changed files with 2 additions and 1 deletions
|
|
@ -292,7 +292,8 @@ getnetid(key, ret)
|
|||
lookup[len] = 0;
|
||||
strcpy(ret, lookup);
|
||||
free(lookup);
|
||||
fclose(fd);
|
||||
if (fd != NULL)
|
||||
fclose(fd);
|
||||
return (2);
|
||||
#else /* YP */
|
||||
#ifdef DEBUG
|
||||
|
|
|
|||
Loading…
Reference in a new issue