code: public void freeSlot(SlotID slotId, AllocationID allocationId) {
  		checkInit();
  
  		TaskManagerSlot slot = slots.get(slotId);
  
  		if (null != slot) {
  			if (slot.getState() == TaskManagerSlot.State.ALLOCATED) {
  				if (Objects.equals(allocationId, slot.getAllocationId())) {
  
  					TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations.get(slot.getInstanceId());
  
  					if (taskManagerRegistration == null) {
  						throw new IllegalStateException("Trying to free a slot from a TaskManager " +
  							slot.getInstanceId() + " which has not been registered.");
  					}
  
  					updateSlotState(slot, taskManagerRegistration, null, null);
  				} else {
  					LOG.debug("Received request to free slot {} with expected allocation id {}, " +
  						"but actual allocation id {} differs. Ignoring the request.", slotId, allocationId, slot.getAllocationId());
  				}
  			} else {
  				LOG.debug("Slot {} has not been allocated.", allocationId);
  			}
  		} else {
  			LOG.debug("Trying to free a slot {} which has not been registered. Ignoring this message.", slotId);
  		}
  	}
docs: Free the given slot from the given allocation. If the slot is still allocated by the given
  allocation id, then the slot will be marked as free and will be subject to new slot requests.
  
  @param slotId identifying the slot to free
  @param allocationId with which the slot is presumably allocated