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
95dc2e2267
commit
a9c5ca51ee
@ -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 New Issue
Block a user