1
0
mirror of https://github.com/yarrick/iodine.git synced 2024-11-26 06:56:05 +03:00

fixed memleak on failure

This commit is contained in:
Bjorn Andersson 2007-01-28 02:01:39 +00:00
parent 90e47bbf8b
commit ac1cb81dec

View File

@ -363,6 +363,7 @@ dns_encode_hostname(const char *host, char *buffer, int size)
word = strtok(h, ".");
while(word) {
if (strlen(word) > 63 || strlen(word) > left) {
free(h);
return -1;
}
left -= (strlen(word) + 1);