mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-03-04 22:31:28 +03:00
[project @ 2004-08-07 12:58:46 by jmb]
Handle malloc failure svn path=/import/netsurf/; revision=1191
This commit is contained in:
parent
2119440878
commit
3cfb34bc4a
@ -654,6 +654,10 @@ void history_go(struct browser_window *bw, struct history_entry *entry)
|
||||
if (entry->frag_id) {
|
||||
url = calloc(strlen(entry->url) + strlen(entry->frag_id) + 5,
|
||||
sizeof(char));
|
||||
if (!url) {
|
||||
warn_user("NoMemory", 0);
|
||||
return;
|
||||
}
|
||||
sprintf(url, "%s#%s", entry->url, entry->frag_id);
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user