Your ticket is valid for travel for both passengers. You need to request TTE to give you a berth if available to the WL passenger.
The WL remains valid and is NOT auto-refunded. In case the WL passenger does not travel collect a receipt for the same from TTE and file TDR for full refund.