summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2020-02-04 13:19:37 -0500
committerQuentin Young <qlyoung@cumulusnetworks.com>2020-02-04 13:19:37 -0500
commite1b36e132b7eda2d230f2f95945e231df37a42f5 (patch)
tree8a40165810e2ddc3f3d3ca0709134554b766b5ca /lib/command.c
parentb3ba5dc7fe769f3719b2812e4fdb9f8f8271032d (diff)
*: remove null check before XFREE
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/command.c b/lib/command.c
index 05bb665657..8811b3a791 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2659,8 +2659,7 @@ int cmd_banner_motd_file(const char *file)
void cmd_banner_motd_line(const char *line)
{
- if (host.motd)
- XFREE(MTYPE_HOST, host.motd);
+ XFREE(MTYPE_HOST, host.motd);
host.motd = XSTRDUP(MTYPE_HOST, line);
}