mirror of
https://github.com/rclone/rclone.git
synced 2026-10-09 14:39:28 -04:00
When the HTTP server failed to initialise, for example because the
listen address was already in use, rclone panicked with a nil pointer
dereference instead of reporting the error.
The deferred cleanup in the constructor read the provider from the
named return value, but `return nil, err` sets that to nil before the
deferred function runs. Use a local variable for the server instead.
(cherry picked from commit f2a390b2d4)