char-device: Avoid use-after-free
char-device: Avoid use-after-free

Reset pointer after freeing the structure pointing to it.

Acked-by: Jonathon Jongsma <c7254805a17bd5c41e24c3a278fcbf3afcdfb0fa@redhat.com>

SPICE/spice,fgouget/spice,SPICE/spice,fgouget/spice,fgouget/spice,fgouget/spice,SPICE/spice