moderatefilename is already freed before the autosubscribe block:
free(moderatefilename);
bool autosubscribe = statctrl(ml->ctrlfd, "autosubscribe");
if (autosubscribe) {
...
if (mfd == -1) {
free(sendfilename);
free(moderatefilename); // double-free
return (-1);
}
Remove the second free.
Fixes: ac7f7646 ("autosubscribe: new feature")
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
int mfd = openat(ml->fd, sendfilename, O_RDONLY);
if (mfd == -1) {
free(sendfilename);
- free(moderatefilename);
return (-1);
}
autosubscribe_sender(ml, mfd, SUB_NOMAIL);