]> granicus.if.org Git - mutt/commitdiff
Use safe_free() instead of free() with mutt_str_replace -
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 10 Jan 2000 10:36:42 +0000 (10:36 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 10 Jan 2000 10:36:42 +0000 (10:36 +0000)
equivalent, but nicer.

lib.c

diff --git a/lib.c b/lib.c
index d16a5e1484048ff2f5b416e243ef8fffe58414c5..04c93ec8483398ec71946e5434987ace40f631f8 100644 (file)
--- a/lib.c
+++ b/lib.c
@@ -145,8 +145,7 @@ char *safe_strdup (const char *s)
 
 void mutt_str_replace (char **p, const char *s)
 {
-  if (*p)
-    free (*p);
+  safe_free ((void **) p);
   *p = safe_strdup (s);
 }