mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-23 23:09:39 +03:00
[project @ 2005-04-09 22:31:26 by rjw]
Close file on memory exhaustion. svn path=/import/netsurf/; revision=1617
This commit is contained in:
parent
bc43904af9
commit
ed30d76336
@ -1374,6 +1374,7 @@ char *ro_gui_uri_file_parse(const char *file_name, char **uri_title)
|
||||
char *url = NULL;
|
||||
FILE *fp;
|
||||
|
||||
*uri_title = NULL;
|
||||
fp = fopen(file_name, "rb");
|
||||
if (!fp) {
|
||||
LOG(("fopen(\"%s\", \"rb\"): %i: %s",
|
||||
@ -1397,6 +1398,7 @@ char *ro_gui_uri_file_parse(const char *file_name, char **uri_title)
|
||||
url = strdup(line);
|
||||
if (!url) {
|
||||
warn_user("NoMemory", 0);
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user