mirror of
https://github.com/accelerator74/Cleaner.git
synced 2025-12-07 10:38:27 +00:00
Fixed memory leaks
This commit is contained in:
parent
1fe4976cab
commit
80bfa1bff3
4
Makefile
4
Makefile
@ -26,7 +26,7 @@ C_OPT_FLAGS = -DNDEBUG -O3 -funroll-loops -pipe -fno-strict-aliasing
|
||||
C_DEBUG_FLAGS = -D_DEBUG -DDEBUG -g -ggdb3
|
||||
C_GCC4_FLAGS = -fvisibility=hidden
|
||||
CPP_GCC4_FLAGS = -fvisibility-inlines-hidden
|
||||
CPP = gcc
|
||||
CPP = clang
|
||||
|
||||
override ENGSET = false
|
||||
ifneq (,$(filter original orangebox orangeboxvalve css left4dead left4dead2 csgo,$(ENGINE)))
|
||||
@ -128,7 +128,7 @@ LINK += -m32 -ldl -lm
|
||||
CFLAGS += -DPOSIX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp \
|
||||
-D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -DCOMPILER_GCC \
|
||||
-Wno-switch -Wall -Werror -mfpmath=sse -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H -m32
|
||||
CPPFLAGS += -Wno-non-virtual-dtor -fno-exceptions -fno-rtti -fno-threadsafe-statics -std=c++11
|
||||
CPPFLAGS += -Wno-non-virtual-dtor -Wno-unused -fno-exceptions -fno-rtti -fno-threadsafe-statics -std=c++14
|
||||
|
||||
################################################
|
||||
### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ###
|
||||
|
||||
@ -47,16 +47,16 @@ bool Cleaner::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
do
|
||||
{
|
||||
c = fgetc(file);
|
||||
++lines;
|
||||
if (c == '\n') ++lines;
|
||||
} while (c != EOF);
|
||||
|
||||
rewind(file);
|
||||
|
||||
int len;
|
||||
g_szStrings = (char**)malloc(lines*sizeof(char**));
|
||||
g_szStrings = new char*[lines];
|
||||
while(!feof(file))
|
||||
{
|
||||
g_szStrings[g_iStrings] = (char*)malloc(256*sizeof(char*));
|
||||
g_szStrings[g_iStrings] = new char[256];
|
||||
if (fgets(g_szStrings[g_iStrings], 255, file) != NULL)
|
||||
{
|
||||
len = strlen(g_szStrings[g_iStrings]);
|
||||
|
||||
@ -40,8 +40,8 @@
|
||||
/* Basic information exposed publicly */
|
||||
#define SMEXT_CONF_NAME "Console Cleaner"
|
||||
#define SMEXT_CONF_DESCRIPTION "Console warning suppressor"
|
||||
#define SMEXT_CONF_VERSION "1.1.0"
|
||||
#define SMEXT_CONF_AUTHOR "Zephyrus, Accelerator"
|
||||
#define SMEXT_CONF_VERSION "1.1.1"
|
||||
#define SMEXT_CONF_AUTHOR "Accelerator, Zephyrus"
|
||||
#define SMEXT_CONF_URL "https://github.com/Accelerator74/Cleaner"
|
||||
#define SMEXT_CONF_LOGTAG "Cleaner"
|
||||
#define SMEXT_CONF_LICENSE "GPLv3"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user