storage/rest: fix resource leak on Set/Delete