peer: Open code g_memdup

g_memdup got marked as depricated in favor for g_memdup2 since GLib
v2.68 which is the very same version g_memdup2 was introduced. We
don't want to increase the minium GLib version to latest greatest
hence open code this function.
1 file changed