plist_set_type: fix non functional code (found by leak analyzis)

Looks like plist_set_type() never set the type. Worse, it leave the node data to a deallocated pointer value.