From 343959c5dced76587c64865f2f9d61facdb31a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Mon, 1 Jun 2015 13:16:11 +0200 Subject: [PATCH] Stop leaking UID --- examples/felica-lite-dump.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/felica-lite-dump.c b/examples/felica-lite-dump.c index 6fce594..b998b10 100644 --- a/examples/felica-lite-dump.c +++ b/examples/felica-lite-dump.c @@ -51,7 +51,9 @@ main (void) } for (int i = 0; tags[i]; i++) { - printf ("Dumping %s tag %s\n", freefare_get_tag_friendly_name (tags[i]), freefare_get_tag_uid (tags[i])); + char *uid = freefare_get_tag_uid (tags[i]); + printf ("Dumping %s tag %s\n", freefare_get_tag_friendly_name (tags[i]), uid); + free (uid); printf ("Number\tName\tData\n"); for (int block = 0x00; block < 0x0f; block++) {