Skip to content

Commit

Permalink
FIX: ATRONIX: Do not free port/state
Browse files Browse the repository at this point in the history
  • Loading branch information
zsx authored and Oldes committed Feb 1, 2018
1 parent 7091c94 commit 7553959
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
17 changes: 0 additions & 17 deletions src/core/c-port.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,23 +113,6 @@
}


/***********************************************************************
**
*/ void Free_Port_State(REBSER *port)
/*
***********************************************************************/
{
REBVAL *state = BLK_SKIP(port, STD_PORT_STATE);

// ??? check that this is the binary we think it is? !!!

if (IS_BINARY(state)) {
Loose_Series(VAL_SERIES(state));
VAL_SET(state, REB_NONE);
}
}


/***********************************************************************
**
*/ REBFLG Pending_Port(REBVAL *port)
Expand Down
3 changes: 0 additions & 3 deletions src/core/p-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ REBINT Mode_Syms[] = {
if (opened) {
OS_DO_DEVICE(file, RDC_CLOSE);
Cleanup_File(file);
Free_Port_State(port);
}

if (file->error) Trap_Port(RE_READ_ERROR, port, file->error);
Expand Down Expand Up @@ -399,7 +398,6 @@ REBINT Mode_Syms[] = {
if (opened) {
OS_DO_DEVICE(file, RDC_CLOSE);
Cleanup_File(file);
Free_Port_State(port);
}

if (file->error) Trap1(RE_WRITE_ERROR, path);
Expand Down Expand Up @@ -427,7 +425,6 @@ REBINT Mode_Syms[] = {
if (IS_OPEN(file)) {
OS_DO_DEVICE(file, RDC_CLOSE);
Cleanup_File(file);
Free_Port_State(port);
}
break;

Expand Down
1 change: 0 additions & 1 deletion src/core/p-net.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ enum Transport_Types {
OS_DO_DEVICE(sock, RDC_CLOSE);
SET_CLOSED(sock);
}
Free_Port_State(port);
break;

case A_LENGTHQ:
Expand Down

0 comments on commit 7553959

Please sign in to comment.