summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpaul <paul>2006-02-21 01:37:14 +0000
committerpaul <paul>2006-02-21 01:37:14 +0000
commitd6dafe24f9c1bdf238eb8ee3d67a8307e92867aa (patch)
tree963666eeb33582a7b6fa51d9f352b4ddc8111580 /lib
parent8372efa7433cce04c1760e09de83a0c2e55c298a (diff)
downloadquagga-d6dafe24f9c1bdf238eb8ee3d67a8307e92867aa.tar.bz2
quagga-d6dafe24f9c1bdf238eb8ee3d67a8307e92867aa.tar.xz
[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.
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog6
-rw-r--r--lib/sockunion.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 6c54cd35..e3833526 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2006-02-02 Paul Jakma <paul.jakma@sun.com>
* workqueue.h: (struct work_queue) Remove the delay field.
diff --git a/lib/sockunion.c b/lib/sockunion.c
index e79f034c..109f3bdd 100644
--- a/lib/sockunion.c
+++ b/lib/sockunion.c
@@ -224,7 +224,7 @@ sockunion_su2str (union sockunion *su)
break;
#endif /* HAVE_IPV6 */
}
- return strdup (str);
+ return XSTRDUP (MTYPE_TMP, str);
}
/* Return socket of sockunion. */
@@ -314,7 +314,7 @@ sockunion_log (union sockunion *su)
snprintf (buf, SU_ADDRSTRLEN, "af_unknown %d ", su->sa.sa_family);
break;
}
- return (strdup (buf));
+ return (XSTRDUP (MTYPE_TMP, buf));
}
/* sockunion_connect returns