mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-16 17:22:44 +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);
|
fclose(f);
|
||||||
|
|
||||||
|
/* window init takes ownership of the ndata if there is no error */
|
||||||
ret = window_init(title, leafname, ndata, ndata_len);
|
ret = window_init(title, leafname, ndata, ndata_len);
|
||||||
|
if (ret != NSERROR_OK) {
|
||||||
|
free(ndata);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user