From 4da9349a918848585e2fea57a295382b67f71cfa Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 26 Mar 2021 08:40:06 +1000 Subject: [PATCH] tools/record: free the namelist when we're done Signed-off-by: Peter Hutterer --- tools/libinput-record.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/libinput-record.c b/tools/libinput-record.c index 94f83d69..0704db39 100644 --- a/tools/libinput-record.c +++ b/tools/libinput-record.c @@ -2064,6 +2064,9 @@ all_devices(void) return devices; error: + for (int i = 0; i < ndev; i++) + free(namelist[i]); + free(namelist); if (devices) strv_free(devices); return NULL;