mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
lookup_unique_name: Handle NULL from expand_tilde
expand_tilde() returns NULL if out of memory. Make lookup_unique_name() handle that.
This commit is contained in:
parent
e6344340dd
commit
f815d27835
@ -671,6 +671,10 @@ lookup_unique_name(struct terminal *term, unsigned char *ofile,
|
||||
int overwrite;
|
||||
|
||||
ofile = expand_tilde(ofile);
|
||||
if (!ofile) {
|
||||
callback(term, NULL, data, resume & ~DOWNLOAD_RESUME_SELECTED);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Minor code duplication to prevent useless call to get_opt_int()
|
||||
* if possible. --Zas */
|
||||
|
Loading…
Reference in New Issue
Block a user