From 005600677148a00d612bb8ae97c8833040be9445 Mon Sep 17 00:00:00 2001 From: Jihoon Jung Date: Tue, 15 Dec 2020 10:24:57 +0900 Subject: Fix Svace issue - WGID 449118 : MEMORY_LEAK.EX Change-Id: I72ccc3bddbd52309fbc1a58a90657b81addc49d4 Signed-off-by: Jihoon Jung --- NFCTerminal.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/NFCTerminal.cpp b/NFCTerminal.cpp index 174c915..e142769 100644 --- a/NFCTerminal.cpp +++ b/NFCTerminal.cpp @@ -341,12 +341,14 @@ namespace smartcard_service_api if (rv == NFC_ERROR_NONE && temp != NULL) { atr.assign(temp, temp_len); - g_free(temp); } else { _ERR("nfc_se_get_atr_internal failed"); } + + if (temp != NULL) + g_free(temp); } else { -- cgit v1.2.3