bus/fslmc: fix resource leak
authorAgalya Babu RadhaKrishnan <agalyax.babu.radhakrishnan@intel.com>
Tue, 10 Sep 2019 07:30:55 +0000 (08:30 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 31 Oct 2019 15:52:17 +0000 (16:52 +0100)
commit6c2c3eb5a7443269fb2851c7c9a5021e6375722e
tree6ee7964ea27e5062cea2fb1b9315bbd00ea2a068
parentc41c100b2278ed4d56fc548697c90e103cc523e2
bus/fslmc: fix resource leak

1 issue caught by coverity (issue 344967).
Leaked_storage: Variable sep going out of scope leaks the
storage it points to.

When 'sep' is not null and sep_exist is 0, 'sep' is freed
before going out of scope of the function irrespective of
'addr' exists or not.

Coverity issue: 344967
Fixes: e67a61614d0b ("bus/fslmc: support device iteration")
Cc: stable@dpdk.org
Signed-off-by: Agalya Babu RadhaKrishnan <agalyax.babu.radhakrishnan@intel.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
drivers/bus/fslmc/fslmc_bus.c