store possible device/card matches as pointers

Avoid invoking the copy constructors and storing new objects which can't
be returned (as they're local variables).