[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:
Richard Wilson 2005-04-09 22:31:26 +00:00
parent bc43904af9
commit ed30d76336

View File

@ -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;
}