mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
exec_on_master_terminal(): reduce code redundancy a bit and use
fmem_alloc() instead of mem_alloc().
This commit is contained in:
parent
b09d2c7a3f
commit
df138c775a
@ -214,7 +214,7 @@ exec_on_master_terminal(struct terminal *term,
|
||||
}
|
||||
|
||||
param_size = plen + dlen + 2 /* 2 null char */ + 1 /* fg */;
|
||||
param = mem_alloc(param_size);
|
||||
param = fmem_alloc(param_size);
|
||||
if (!param) return;
|
||||
|
||||
param[0] = fg;
|
||||
@ -225,13 +225,12 @@ exec_on_master_terminal(struct terminal *term,
|
||||
|
||||
blockh = start_thread((void (*)(void *, int)) exec_thread,
|
||||
param, param_size);
|
||||
fmem_free(param);
|
||||
if (blockh == -1) {
|
||||
if (fg == 1) unblock_itrm(term->fdin);
|
||||
mem_free(param);
|
||||
return;
|
||||
}
|
||||
|
||||
mem_free(param);
|
||||
if (fg == 1) {
|
||||
term->blocked = blockh;
|
||||
set_handlers(blockh,
|
||||
|
Loading…
Reference in New Issue
Block a user