Fixed missing free on malloc, no more crashing!

This commit is contained in:
Pentium44 2021-08-15 03:12:56 -04:00
parent 40f9056774
commit 01d751aa42
2 changed files with 4 additions and 2 deletions

View File

@ -98,10 +98,12 @@ char *process_string(char *in, int n) {
if(strncmp(msg, searchstr, strlen(searchstr))==0) {
sprintf(b,"PRIVMSG %s :%s, %s\r\n",chan,
name,dictionary[k].reply);
if(searchstr != NULL) free(searchstr);
return b;
}
if(searchstr != NULL) free(searchstr);
}
/*if(strncmp(msg, "@topic", 4)==0) {
if(strncmp(name, owner, strlen(owner))==0) {
(void)set_topic(e, topic, "./channels.log");

View File

@ -2,7 +2,7 @@
YOURUSER="Pentium44"
BOTNICK="MultiServ"
BOTPASS="changemeeeee"
BOTPASS="changeme"
ADDRESS="localhost"
PORT="1337"