diff options
author | Niels Provos <provos@cvs.openbsd.org> | 2000-03-21 17:51:01 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 2000-03-21 17:51:01 +0000 |
commit | d56b8f351f6b824e3827dc08395a9b942361202b (patch) | |
tree | 4c9d0c9c1cc009f2e4848fde3074e87105a4371a /sys | |
parent | fa163a21fbf20cb3fd476385485a6d4d509a3386 (diff) |
only free in swap_off if allocated.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/uvm/uvm_swap.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |