memory: Small changes to fix some memory leaks.

Four small leaks in *scam, sx1276, and ozw.  Added calls to
cleanup resources before throws.

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck
2016-09-21 12:25:02 -07:00
parent 87b10e33d0
commit a57f1c9691
4 changed files with 4 additions and 0 deletions

View File

@ -468,6 +468,7 @@ bool GROVESCAM::storeImage(const char *fname)
goto retry;
else
{
fclose(file);
throw std::runtime_error(std::string(__FUNCTION__) +
": cksum error, maximum retries exceeded");
return false;