few missing free()
This commit is contained in:
parent
e096f1f421
commit
e9cf48081b
2 changed files with 4 additions and 0 deletions
|
@ -179,6 +179,7 @@ main(int argc, char *argv[])
|
|||
if (fread (ndef_msg, 1, ndef_msg_len, ndef_stream) != ndef_msg_len) {
|
||||
fprintf (stderr, "Could not read NDEF from file: %s\n", ndef_input);
|
||||
fclose (ndef_stream);
|
||||
free (ndef_msg);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
fclose (ndef_stream);
|
||||
|
@ -400,6 +401,8 @@ error:
|
|||
free (tag_uid);
|
||||
}
|
||||
|
||||
if (ndef_msg != ndef_default_msg)
|
||||
free (ndef_msg);
|
||||
freefare_free_tags (tags);
|
||||
nfc_close (device);
|
||||
}
|
||||
|
|
|
@ -256,6 +256,7 @@ main(int argc, char *argv[])
|
|||
}
|
||||
free (tag_uid);
|
||||
}
|
||||
free (ndef_msg);
|
||||
freefare_free_tags (tags);
|
||||
nfc_close (device);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue