Coverity scan #743105, buf is xmalloc'ed but never freed in some error conditions. Added xfree for buf before error returns.
Signed-off-by: Morgan Stewart <[email protected]> --- vtysh.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 vtysh.patch diff --git a/vtysh.patch b/vtysh.patch new file mode 100644 index 0000000..1fa9783 --- /dev/null +++ b/vtysh.patch @@ -0,0 +1,12 @@ +diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c +index b33ac90..66f4cf1 100644 +--- a/vtysh/vtysh.c ++++ b/vtysh/vtysh.c +@@ -122,6 +122,7 @@ vtysh_client_config (struct vtysh_client *vclient, char *line) + { + fprintf (stderr, ERR_WHERE_STRING \ + "warning - pbuf beyond buffer end.\n"); ++ XFREE(MTYPE_TMP, buf); + return CMD_WARNING; + } + -- 1.9.1 _______________________________________________ Quagga-dev mailing list [email protected] https://lists.quagga.net/mailman/listinfo/quagga-dev
