From f55c87884a5268db176f61e480fe6ddf73a1057c Mon Sep 17 00:00:00 2001 From: provos Date: Tue, 21 Mar 2000 17:51:00 +0000 Subject: [PATCH] only free in swap_off if allocated. --- sys/uvm/uvm_swap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c index c00ccc2db9a..a96536cc9ba 100644 --- a/sys/uvm/uvm_swap.c +++ b/sys/uvm/uvm_swap.c @@ -1247,7 +1247,8 @@ swap_off(p, sdp) return ENODEV; #ifdef UVM_SWAP_ENCRYPT - free(sdp->swd_decrypt); + if (sdp->swd_decrypt) + free(sdp->swd_decrypt); #endif extent_free(swapmap, sdp->swd_mapoffset, sdp->swd_mapsize, EX_WAITOK); name = sdp->swd_ex->ex_name; -- 2.20.1