summaryrefslogtreecommitdiffstats
path: root/pbrd
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-04-17 23:51:48 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-04-18 18:16:19 +0200
commitd64169679f4efccd5be63d4ca5c73b6bc41187d6 (patch)
treee7e9a44496f3c1572989a92f368a02f230419896 /pbrd
parentpbrd: remove unsafe string copy (diff)
downloadfrr-d64169679f4efccd5be63d4ca5c73b6bc41187d6.tar.xz
frr-d64169679f4efccd5be63d4ca5c73b6bc41187d6.zip
pbrd: remove pbr-policy resource leak
Removing a non-existent pbr-policy caused a pbr_interface to leak. Coverity #1467829 Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'pbrd')
-rw-r--r--pbrd/pbr_vty.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c
index f598b2645..16ae0ee2b 100644
--- a/pbrd/pbr_vty.c
+++ b/pbrd/pbr_vty.c
@@ -313,10 +313,11 @@ DEFPY (pbr_policy,
pbrm = pbrm_find(mapname);
if (!pbr_ifp) {
- /*
- * Some one could have fat fingered the interface
- * name
- */
+ /* we don't want one and we don't have one, so... */
+ if (no)
+ return CMD_SUCCESS;
+
+ /* Some one could have fat fingered the interface name */
pbr_ifp = pbr_if_new(ifp);
}