From fb37cf8538ac82030c86332ae050a3d621b98b37 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Wed, 16 Oct 2019 08:55:45 +0900 Subject: [PATCH] Fix coverity warning. --- src/watchdog/wd_utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/watchdog/wd_utils.c b/src/watchdog/wd_utils.c index 673a05552..048ef8ddd 100644 --- a/src/watchdog/wd_utils.c +++ b/src/watchdog/wd_utils.c @@ -76,7 +76,10 @@ wd_check_network_command_configurations(void) if (command) { if (command[0] == '/') + { + pfree(command); return; + } snprintf(path, sizeof(path), "%s/%s", pool_config->if_cmd_path, command); pfree(command); -- 2.39.5