void FreeURL(ParsedURL** Url)
{
- FreeStrBuf(&(*Url)->URL);
- free(*Url);
- *Url = NULL;
+ if (*Url != NULL) {
+ FreeStrBuf(&(*Url)->URL);
+ if ((*Url)->Next != NULL)
+ FreeURL(&(*Url)->Next);
+ free(*Url);
+ *Url = NULL;
+ }
}
void FreeMailQEntry(void *qv)
if ((StrLength(SendMsg) > 0) &&
ChrPtr(SendMsg)[StrLength(SendMsg) - 1] != '\n') {
CtdlLogPrintf(CTDL_WARNING,
- "SMTP client[%ld]: Possible problem: message did not "
+ "SMTP client[%d]: Possible problem: message did not "
"correctly terminate. (expecting 0x10, got 0x%02x)\n",
MsgCount, //yes uncool, but best choice here...
ChrPtr(SendMsg)[StrLength(SendMsg) - 1] );
url->Host ++;
pEndHost = strchr(url->Host, ']');
if (pEndHost == NULL) {
+ FreeStrBuf(&url->URL);
free(url);
return 0; /* invalid syntax, no ipv6 */
}
+ StrBufPeek(url->URL, pEndHost, 0, '\0');
if (*(pEndHost + 1) == ':'){
StrBufPeek(url->URL, pEndHost + 1, 0, '\0');
pPort = pEndHost + 2;