mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 18:27:21 +00:00
lib: null return value check (Coverity 1469894)
Signed-off-by: F. Aragon <paco@voltanet.io>
This commit is contained in:
parent
9eafc8abd7
commit
9f227e4c91
@ -1184,7 +1184,7 @@ static int handle_pipe_action(struct vty *vty, const char *cmd_in,
|
|||||||
char **cmd_out)
|
char **cmd_out)
|
||||||
{
|
{
|
||||||
/* look for `|` */
|
/* look for `|` */
|
||||||
char *orig, *working, *token;
|
char *orig, *working, *token, *u;
|
||||||
char *pipe = strstr(cmd_in, "| ");
|
char *pipe = strstr(cmd_in, "| ");
|
||||||
|
|
||||||
if (!pipe)
|
if (!pipe)
|
||||||
@ -1213,7 +1213,8 @@ static int handle_pipe_action(struct vty *vty, const char *cmd_in,
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
*cmd_out = XSTRDUP(MTYPE_TMP, cmd_in);
|
*cmd_out = XSTRDUP(MTYPE_TMP, cmd_in);
|
||||||
*(strstr(*cmd_out, "|")) = '\0';
|
u = *cmd_out;
|
||||||
|
strsep(&u, "|");
|
||||||
} else {
|
} else {
|
||||||
vty_out(vty, "%% Unknown action '%s'\n", token);
|
vty_out(vty, "%% Unknown action '%s'\n", token);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Loading…
Reference in New Issue
Block a user