mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-16 01:02:36 +03:00
ensure memory is freed on error path in gtk viewdata
This commit is contained in:
parent
82c1ed9f4a
commit
7ec917eed2
@ -489,7 +489,11 @@ window_init_fname(const char *title,
|
||||
|
||||
fclose(f);
|
||||
|
||||
/* window init takes ownership of the ndata if there is no error */
|
||||
ret = window_init(title, leafname, ndata, ndata_len);
|
||||
if (ret != NSERROR_OK) {
|
||||
free(ndata);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user