mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[images] Check for file readability, but also free memory. Refs #257
This commit is contained in:
parent
82431263ed
commit
9d42b1dda0
@ -1654,7 +1654,8 @@ tp_open(struct type_query *type_query)
|
|||||||
if (url) {
|
if (url) {
|
||||||
char *filename = check_url_tempfiles(url);
|
char *filename = check_url_tempfiles(url);
|
||||||
|
|
||||||
if (filename && file_can_read(filename)) {
|
if (filename) {
|
||||||
|
if (file_can_read(filename)) {
|
||||||
char *handler = subst_file(type_query->external_handler, filename, filename);
|
char *handler = subst_file(type_query->external_handler, filename, filename);
|
||||||
|
|
||||||
if (handler) {
|
if (handler) {
|
||||||
@ -1672,6 +1673,8 @@ tp_open(struct type_query *type_query)
|
|||||||
mem_free(url);
|
mem_free(url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
mem_free(filename);
|
||||||
|
}
|
||||||
mem_free(url);
|
mem_free(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user