From 98f162ab1ac924394cd9bbe4c8d26047f4f54b2c Mon Sep 17 00:00:00 2001 From: Logan Date: Mon, 20 Mar 2023 15:04:26 +0800 Subject: [PATCH] Fix memery leak --- rc522.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rc522.c b/rc522.c index 568634ae..a7058d5b 100644 --- a/rc522.c +++ b/rc522.c @@ -610,6 +610,8 @@ static void rc522_task(void* arg) free(serial_no_array); rc522_dispatch_event(rc522, RC522_EVENT_TAG_SCANNED, &tag); rc522->tag_was_present_last_time = true; + } else { + free(serial_no_array); } int delay_interval_ms = rc522->config->scan_interval_ms;