From 1cc192b72e9b13d516af529b4a6e00c40627fc5f Mon Sep 17 00:00:00 2001 From: Matt Mundell Date: Thu, 19 Sep 2019 20:01:20 +0200 Subject: [PATCH] Check filter before using it in osp_get_vts_ext --- osp/osp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/osp/osp.c b/osp/osp.c index 339a5f865..72f1c107f 100644 --- a/osp/osp.c +++ b/osp/osp.c @@ -405,9 +405,15 @@ osp_get_vts_ext (osp_connection_t *connection, osp_get_vts_opts_t opts, entity_t if (vts == NULL) return 1; - if (osp_send_command (connection, vts, "", opts.filter)) - return 1; + if (opts.filter) + { + if (osp_send_command (connection, vts, "", opts.filter)) + return 1; + return 0; + } + if (osp_send_command (connection, vts, "")) + return 1; return 0; }