Hi Vu

Ack

Thanks
Lennart

> -----Original Message-----
> From: Vu Minh Nguyen <vu.m.ngu...@dektech.com.au>
> Sent: den 3 augusti 2018 04:37
> To: Lennart Lund <lennart.l...@ericsson.com>
> Cc: opensaf-devel@lists.sourceforge.net; Vu Minh Nguyen
> <vu.m.ngu...@dektech.com.au>
> Subject: [PATCH 1/1] smf: fix memory leak reported by clang [#2904]
> 
> When SmfImmOperation::Execute() gets failed in
> SmfImmUtils::doImmOperations(),
> the allocated memory `rollbackData` is not deallocated.
> ---
>  src/smf/smfd/SmfUtils.cc | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/smf/smfd/SmfUtils.cc b/src/smf/smfd/SmfUtils.cc
> index 77d424a65..915c086a5 100644
> --- a/src/smf/smfd/SmfUtils.cc
> +++ b/src/smf/smfd/SmfUtils.cc
> @@ -704,6 +704,8 @@ SaAisErrorT SmfImmUtils::doImmOperations(
>      if (result != SA_AIS_OK) {
>        LOG_WA("%s: imm_operation->Execute Fail, %s", __FUNCTION__,
>               saf_error(result));
> +      delete rollbackData;
> +      rollbackData = nullptr;
>        break;
>      }
> 
> --
> 2.18.0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to