summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2004-03-05 16:55:31 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2004-03-05 16:55:31 +0000
commita9e9def7f4bfa07373a4d32243310ea0f9d03b88 (patch)
treeb50b4f9318b3ad19acdf724bd400ef9fee3b06d1
parent7f1eced1ea5cd6eb706d6aff1cb7a132806de29d (diff)
downloadnetsurf-a9e9def7f4bfa07373a4d32243310ea0f9d03b88.tar.gz
netsurf-a9e9def7f4bfa07373a4d32243310ea0f9d03b88.tar.bz2
[project @ 2004-03-05 16:55:31 by jmb]
Attempt to fix bad xstrdup. svn path=/import/netsurf/; revision=585
-rw-r--r--riscos/gui.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/riscos/gui.c b/riscos/gui.c
index b96937a18..8b220e31b 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -826,24 +826,24 @@ void ro_msg_dataload(wimp_message *message)
/* uri file */
if (message->data.data_xfer.file_type == 0xf91) {
- char *temp;
+ char *temp, *url1;
int i=0;
FILE *fp = fopen(message->data.data_xfer.file_name, "r");
if (!fp) return;
- url = xcalloc(256, sizeof(char)); /* fixed size != good */
+ url1 = xcalloc(256, sizeof(char)); /* fixed size != good */
while (i != 2) {
- temp = fgets(url, 256, fp);
+ temp = fgets(url1, 256, fp);
if (!temp) {
- xfree(url);
+ xfree(url1);
return;
}
- temp = xstrdup(strip(url));
- xfree(url);
- url = temp;
+ temp = strip(url1);
+ url = xstrdup(temp);
+ xfree(url1);
if (url[0] != '#') { /* not a comment */
i++;
}