summaryrefslogtreecommitdiffstats
path: root/src/core/xfer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/xfer.c')
-rw-r--r--src/core/xfer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/xfer.c b/src/core/xfer.c
index a9bcb4d7b..1ec6f9d3f 100644
--- a/src/core/xfer.c
+++ b/src/core/xfer.c
@@ -45,11 +45,14 @@ static struct xfer_metadata dummy_metadata;
*/
void xfer_close ( struct xfer_interface *xfer, int rc ) {
struct xfer_interface *dest = xfer_get_dest ( xfer );
+ struct xfer_interface_operations *op = xfer->op;
DBGC ( xfer, "XFER %p->%p close\n", xfer, dest );
xfer_unplug ( xfer );
+ xfer_nullify ( xfer );
dest->op->close ( dest, rc );
+ xfer->op = op;
xfer_put ( dest );
}