diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-03-05 13:23:48 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-03-05 13:23:48 +0000 |
commit | 0bb832d890dd910885919bbbeb83a806d9595b1e (patch) | |
tree | 1ca9517588f57a4307a28bc407622d0d44a54d35 /riscos/gui.c | |
parent | 0ea3e074f6a28b61c16e5cbfcb2f084035d85ea3 (diff) | |
download | netsurf-0bb832d890dd910885919bbbeb83a806d9595b1e.tar.gz netsurf-0bb832d890dd910885919bbbeb83a806d9595b1e.tar.bz2 |
[project @ 2004-03-05 13:23:48 by jmb]
Fix memory leak when fgets fails.
Add debugging round early part of gui_init
svn path=/import/netsurf/; revision=583
Diffstat (limited to 'riscos/gui.c')
-rw-r--r-- | riscos/gui.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/riscos/gui.c b/riscos/gui.c index 0a816cee7..28e617eb2 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -132,16 +132,23 @@ void gui_init(int argc, char** argv) char theme_fname[256]; os_error *error; + LOG(("starting hourglass")); xhourglass_start(1); + LOG(("reading choices")); options_read("Choices:WWW.NetSurf.Choices"); + LOG(("choosing language")); ro_gui_choose_language(); + LOG(("grabbing NetSurf$Dir from the environment")); NETSURF_DIR = getenv("NetSurf$Dir"); sprintf(path, "<NetSurf$Dir>.Resources.%s.Messages", option_language); + LOG(("Loading messages from '%s'", path)); messages_load(path); + LOG(("done")); + task_handle = wimp_initialise(wimp_VERSION_RO38, "NetSurf", (wimp_message_list*) &task_messages, 0); @@ -829,7 +836,10 @@ void ro_msg_dataload(wimp_message *message) fclose(fp); - if (!temp) return; + if (!temp) { + xfree(url); + return; + } if (url[strlen(url)-1] == '\n') { url[strlen(url)-1] = '\0'; @@ -949,7 +959,10 @@ void ro_msg_dataopen(wimp_message *message) fclose(fp); - if (!temp) return; + if (!temp) { + xfree(url); + return; + } if (url[strlen(url)-1] == '\n') { url[strlen(url)-1] = '\0'; |