]> git.puffer.fish Git - matthieu/frr.git/commitdiff
[lib/sockunion] trivial: use XSTRDUP.
authorPaul Jakma <paul.jakma@sun.com>
Tue, 21 Feb 2006 01:37:14 +0000 (01:37 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Tue, 21 Feb 2006 01:37:14 +0000 (01:37 +0000)
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.

lib/ChangeLog
lib/sockunion.c

index 6c54cd359989356bb6333b3057da776a81a41adb..e383352686d7d1ec02b4ceacb55087fe9fbaf87f 100644 (file)
@@ -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.
index e79f034c8133c9dfb28829ca737848d1001d477b..109f3bdd6308645ad37efcaab0a30e0c29c7cbc2 100644 (file)
@@ -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