Alright...

I think the probably is in your registry functions... You aren't allocating any of your character arrays.