[lib/sockunion] trivial: use XSTRDUP.
2006-02-21 Paul Jakma <paul.jakma@sun.com>
* sockunion.c: (sockunion_{su2str,log}) Use XSTRDUP.
Particularly with _su2str, as that string gets XFREEd,
which can be annoying if run debug code in memory.c.
diff --git a/lib/sockunion.c b/lib/sockunion.c
index e79f034..109f3bd 100644
--- a/lib/sockunion.c
+++ b/lib/sockunion.c
@@ -224,7 +224,7 @@
break;
#endif /* HAVE_IPV6 */
}
- return strdup (str);
+ return XSTRDUP (MTYPE_TMP, str);
}
/* Return socket of sockunion. */
@@ -314,7 +314,7 @@
snprintf (buf, SU_ADDRSTRLEN, "af_unknown %d ", su->sa.sa_family);
break;
}
- return (strdup (buf));
+ return (XSTRDUP (MTYPE_TMP, buf));
}
/* sockunion_connect returns