Devices for retaining pallets or freight containers