openweave/openweave-core

BDXTransfer object leaked during software update

jaylogue opened this issue · 2 comments

The SoftwareUpdateManager in the OpenWeave Device Layer leaks the BDXTransfer object used to fetch a firmware image. This has been observed to happen when the BDX transfer fails, e.g. due to the image server returning an error. However, a review of the code suggests that the leak happens even when the transfer is successful.

In particular, GenericSoftwareUpdateManagerImpl_BDX<> calls BDXNode::NewTransfer() to allocate a BDXTransfer object each time a download is started. However at no point in the code is this object released.

This issue is related to issue#412. Indeed, it is likely that fixing this issue also fixes the exchange context leak.

Fixed.