diff --git a/RestServer/main.c b/RestServer/main.c index 29e7a68..d3c0b02 100644 --- a/RestServer/main.c +++ b/RestServer/main.c @@ -108,6 +108,7 @@ int callback_absTempHum(const struct _u_request *request, struct _u_response *re insertData(1, temphum[0], temphum[1], 0); ulfius_set_string_body_response(response, 200, response_body); + free(response_body); //o_free(url_params); return U_CALLBACK_CONTINUE; } @@ -125,6 +126,7 @@ int callback_calcAbsTempHum(const struct _u_request *request, struct _u_response char *response_body = msprintf("%f", absoluteHumidityFloat(temphum[0], temphum[1])); ulfius_set_string_body_response(response, 200, response_body); + free(response_body); //o_free(url_params); return U_CALLBACK_CONTINUE; } diff --git a/RestServer/makefile b/RestServer/makefile index 16bc654..43f0bcd 100644 --- a/RestServer/makefile +++ b/RestServer/makefile @@ -3,7 +3,7 @@ VERSION = 1.0 CC = cc -CFLAGS = -Wall -g -D_GNU_SOURCE -D_REENTRANT -DVERSION=\"$(VERSION)\" `mysql_config --cflags` +CFLAGS = -Wall -O3 -D_GNU_SOURCE -D_REENTRANT -DVERSION=\"$(VERSION)\" `mysql_config --cflags` #LDFLAGS = -lm -lpthread `gtk-config --cflags` `gtk-config --libs` -lgthread LDFLAGS = `mysql_config --libs` -lm -lulfius -lyder -lorcania