mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-28 20:56:40 +00:00
Adds nfc_free() function to freed allocated buffers
Fixes issue 228 (Thanks to Alex Lian)
This commit is contained in:
@@ -125,7 +125,7 @@ main(int argc, const char *argv[])
|
||||
if (verbose) {
|
||||
if (nfc_device_get_information_about(pnd, &strinfo) >= 0) {
|
||||
printf("%s", strinfo);
|
||||
free(strinfo);
|
||||
nfc_free(strinfo);
|
||||
}
|
||||
}
|
||||
nfc_close(pnd);
|
||||
|
||||
@@ -120,5 +120,5 @@ print_nfc_target(const nfc_target nt, bool verbose)
|
||||
char *s;
|
||||
str_nfc_target(&s, nt, verbose);
|
||||
printf("%s", s);
|
||||
free(s);
|
||||
nfc_free(s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user