From f7be4ee7664d1ff0414e26c16faa7c587fffab88 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Thu, 6 Oct 2011 10:38:15 -0400 Subject: [PATCH] don't check for NULL before XFREE strdup -> xstrdup --- amd/srvr_amfs_auto.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/amd/srvr_amfs_auto.c b/amd/srvr_amfs_auto.c index 250111f6..93afe45a 100644 --- a/amd/srvr_amfs_auto.c +++ b/amd/srvr_amfs_auto.c @@ -69,7 +69,7 @@ amfs_generic_find_srvr(mntfs *mf) if (!fs) { fs = ALLOC(struct fserver); fs->fs_refc = 0; - fs->fs_host = strdup("localhost"); + fs->fs_host = xstrdup("localhost"); fs->fs_ip = NULL; fs->fs_cid = 0; fs->fs_pinger = AM_PINGER; @@ -135,8 +135,7 @@ timeout_srvr(voidp v) /* * Free the net address */ - if (fs->fs_ip) - XFREE(fs->fs_ip); + XFREE(fs->fs_ip); /* * Free the host name. -- 2.43.0