}
else {
rdns_info ("no buffer remain for punycoding query");
- free (*out);
- return false;
+ goto err;
}
free (uclabel);
}
if (remain < label_len + 1) {
rdns_info ("no buffer remain for punycoding query");
- return false;
+ goto err;
}
if (label_len == 0) {
/* Two dots in order, skip this */
}
if (remain < label_len + 1) {
rdns_info ("no buffer remain for punycoding query");
- return false;
+ goto err;
}
memcpy (o, p, label_len);
o += label_len;
}
if (remain == 0) {
rdns_info ("no buffer remain for punycoding query");
- return false;
+ goto err;
}
}
*o = '\0';
*outlen = o - *out;
return true;
+
+ err:
+ free (*out);
+ *out = NULL;
+ return false;
}
bool
break;
case RSPAMD_SRV_HYPERSCAN_LOADED:
/* Broadcast command to all workers */
+ memset (&wcmd, 0, sizeof (wcmd));
wcmd.type = RSPAMD_CONTROL_HYPERSCAN_LOADED;
/*
* We assume that cache dir is shared at the same address for all