diff options
-rw-r--r-- | NFCTerminal.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 { |