add: safe memory free

This commit is contained in:
Talyx
2022-02-20 14:47:24 +03:00
parent 5c2888190c
commit 0f74c88af6
3 changed files with 19 additions and 4 deletions

View File

@@ -36,7 +36,11 @@ Request::Request(char *str)
void Request::freeData(void)
{
delete _body;
if (_body != NULL)
{
delete _body;
_body = NULL;
}
}
std::string &Request::getURI(void)