telemetry: fix error checking for strchr function
authorCiara Power <ciara.power@intel.com>
Tue, 12 May 2020 15:28:59 +0000 (16:28 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 19 May 2020 13:05:56 +0000 (15:05 +0200)
commitbd3c89cb1ab38ba04033f3ae8aa08823d4a43f88
tree0380ceb329f7081b632f9b6efe05c27683c76961
parentfebbebf7f25558ed9261416269d3b5e6358c6262
telemetry: fix error checking for strchr function

The strchr function return was not being checked which could lead to
NULL deferencing later in the function.

Coverity issue: 358438, 358445
Fixes: b80fe1805eee ("telemetry: introduce backward compatibility")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
lib/librte_telemetry/telemetry_legacy.c