doctor: Fix typo and a minor memory leak
Is this even a correct change? I saw some porting to smart pointers in KWin lately.
Probably not worth bothering anyway, as there is a new branch from apol that drops dpmsclient file completely, superseding it a new library.