prevent use-after-free in smtpp

This commit is contained in:
Vladimir Dubrovin 2022-08-31 14:34:48 +03:00
parent bac19c9ae6
commit 5165a4d5bd

View File

@ -61,10 +61,10 @@ int readcommand (struct clientparam* param) {
}
#endif
socksend(param->remsock, buf, i, conf.timeouts[STRING_S]);
myfree(buf);
if(!strncasecmp((char *)buf, "STARTTLS", 8) || !strncasecmp((char *)buf, "TURN", 4)){
ret = 22;
}
myfree(buf);
return ret;
}