Fixed missing free on malloc, no more crashing!
This commit is contained in:
parent
40f9056774
commit
01d751aa42
@ -98,8 +98,10 @@ char *process_string(char *in, int n) {
|
|||||||
if(strncmp(msg, searchstr, strlen(searchstr))==0) {
|
if(strncmp(msg, searchstr, strlen(searchstr))==0) {
|
||||||
sprintf(b,"PRIVMSG %s :%s, %s\r\n",chan,
|
sprintf(b,"PRIVMSG %s :%s, %s\r\n",chan,
|
||||||
name,dictionary[k].reply);
|
name,dictionary[k].reply);
|
||||||
|
if(searchstr != NULL) free(searchstr);
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
if(searchstr != NULL) free(searchstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if(strncmp(msg, "@topic", 4)==0) {
|
/*if(strncmp(msg, "@topic", 4)==0) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
YOURUSER="Pentium44"
|
YOURUSER="Pentium44"
|
||||||
BOTNICK="MultiServ"
|
BOTNICK="MultiServ"
|
||||||
BOTPASS="changemeeeee"
|
BOTPASS="changeme"
|
||||||
ADDRESS="localhost"
|
ADDRESS="localhost"
|
||||||
PORT="1337"
|
PORT="1337"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user