fix memory leak
This commit is contained in:
parent
9aecac6010
commit
3b7f546d0d
9
Makefile
9
Makefile
|
@ -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)"
|
||||
|
|
2
server.c
2
server.c
|
@ -345,6 +345,8 @@ conn_end:
|
|||
pthread_join(thread, NULL);
|
||||
}
|
||||
free(args);
|
||||
vec_free(device_threads);
|
||||
vec_free(device_controllers);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue