fix memory leak

This commit is contained in:
viandoxdev 2022-10-12 19:40:53 +02:00
parent 9aecac6010
commit 3b7f546d0d
No known key found for this signature in database
GPG Key ID: AF1410C5BC10AA25
3 changed files with 8 additions and 7 deletions

View File

@ -2,9 +2,8 @@ Q=@
CC=clang
GCCCFLAGS=-Wno-format-truncation
CLANGCFLAGS=-fsanitize=memory
CFLAGS=-std=c11 -pedantic -g -Wall -pthread -D_GNU_SOURCE
LDFLAGS=-lm -fsanitize=memory
CFLAGS=-std=c11 -pedantic -g -Wall -pthread -D_GNU_SOURCE -fsanitize=address
LDFLAGS=-lm -fsanitize=address
BUILD_DIR=./objects
BIN=jsfw
@ -19,10 +18,6 @@ ifeq ($(CC),gcc)
CFLAGS:=$(CFLAGS) $(GCCCFLAGS)
endif
ifeq ($(CC),clang)
CFLAGS:=$(CFLAGS) $(CLANGCFLAGS)
endif
.PHONY: run
run: $(BIN)
@echo "RUN $(BIN) $(RUNARGS)"

View File

@ -345,6 +345,8 @@ conn_end:
pthread_join(thread, NULL);
}
free(args);
vec_free(device_threads);
vec_free(device_controllers);
return NULL;
}

View File

@ -3,6 +3,10 @@
{
"filter": { "name": "SteelSeries SteelSeries Rival 310 eSports Mouse" },
"tag": "Mouse"
},
{
"filter": { "name": "Logitech Gaming Mouse G502" },
"tag": "Mouse"
}
],
"poll_interval": 1