discover: Fix potentially-uninitialised variables