mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-18 02:47:36 +00:00
Fix bug: actually close the file in entry_close_port.
Copied from Perforce Change: 180300 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
44b734b3a0
commit
0686f64ff4
1 changed files with 4 additions and 1 deletions
|
|
@ -2404,7 +2404,10 @@ static obj_t entry_close_port(obj_t env, obj_t op_env, obj_t operator, obj_t ope
|
|||
eval_args(operator->operator.name, env, op_env, operands, 1, &port);
|
||||
unless(TYPE(port) == TYPE_PORT)
|
||||
error("%s: argument must be a port", operator->operator.name);
|
||||
port->port.stream = NULL;
|
||||
if(port->port.stream != NULL) {
|
||||
fclose(port->port.stream);
|
||||
port->port.stream = NULL;
|
||||
}
|
||||
return obj_undefined;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue