Bug 836715 - Fix potential memory problem in RemoveDeviceTask, r=qdot

From 6e3780271509a502462560717f7cc768dafb673b Mon Sep 17 00:00:00 2001