I figured it out. Not only did I need to malloc the pairs but I also need to malloc the member variables inside each malloc's pairs.
I ended up using my tempCounter to see how many characters I needed and malloc'd the correct amount for the member variables.