summaryrefslogtreecommitdiffstats
path: root/lib/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/command.c b/lib/command.c
index 0bf856f24..a98654dd2 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2409,11 +2409,7 @@ static int set_log_file(struct vty *vty, const char *fname, int loglevel)
return CMD_WARNING_CONFIG_FAILED;
}
- if ((p = XMALLOC(MTYPE_TMP, strlen(cwd) + strlen(fname) + 2))
- == NULL) {
- zlog_err("config_log_file: Unable to alloc mem!");
- return CMD_WARNING_CONFIG_FAILED;
- }
+ p = XMALLOC(MTYPE_TMP, strlen(cwd) + strlen(fname) + 2);
sprintf(p, "%s/%s", cwd, fname);
fullpath = p;
} else