From 526ead055a78c6609e89cbc52cd1f31afaaf763b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D0=BB=D0=B0=20=D0=93=D0=BE=D1=80?= =?UTF-8?q?=D0=BD=D1=83=D1=88=D0=BA=D0=BE?= Date: Wed, 29 Nov 2023 16:10:05 +0300 Subject: [PATCH] fix memory leak --- main/cmd_can.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main/cmd_can.c b/main/cmd_can.c index 5a0c74f..dc60b20 100644 --- a/main/cmd_can.c +++ b/main/cmd_can.c @@ -465,6 +465,7 @@ static int cansmartfilter(int argc, char **argv) { for (int i = 0; i < c_l; i++) if (!isxdigit((int) code_substr[i])) goto invalid_args; if (sscanf(code_substr, "%" PRIX32, &filt_element->filt) < 1) goto invalid_args; if (sscanf(mask_substr, "%" PRIX32, &filt_element->mask) < 1) goto invalid_args; + free(filter_str_buf); list_push(&adv_filters.filters, (void *) filt_element); if (i == 0) { hwfilt_mask = filt_element->mask;