It gets annoying when you've written a Connect via IP textbox for 2.1 that includes clipboard functionality and 2.2's Connect via IP textbox doesn't include clipboard functionality.
Also added a comment but you didn't see that.
Major thanks to James for helping me. Turns out that strncpy thwarts the memory leaks for me. Silly, me!