mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix a regression introduced in rev 1.99: replace fclose(f) with a comment
explaining why f cannot possibly be a valid FILE * at this point. MFC after: 1 day
This commit is contained in:
parent
73e9aa89e8
commit
b2a9c5a1ba
1 changed files with 5 additions and 1 deletions
|
|
@ -1181,7 +1181,11 @@ fetchStatFTP(struct url *url, struct url_stat *us, const char *flags)
|
|||
f = ftp_request(url, "STAT", us, ftp_get_proxy(url, flags), flags);
|
||||
if (f == NULL)
|
||||
return (-1);
|
||||
fclose(f);
|
||||
/*
|
||||
* When op is "STAT", ftp_request() will return either NULL or
|
||||
* (FILE *)1, never a valid FILE *, so we mustn't fclose(f) before
|
||||
* returning, as it would cause a segfault.
|
||||
*/
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue