Brenden Matthews 2023-02-14 18:35:23 -05:00 committed by Brenden Matthews
parent a3f31dd96d
commit 4807d3c68d
3 changed files with 3 additions and 4 deletions

View File

@ -49,7 +49,7 @@ void clear_diskio_stats() {
cur = stats.next;
stats.next = stats.next->next;
free_and_zero(cur->dev);
free(cur);
delete cur;
}
}

View File

@ -107,7 +107,7 @@ void cimlib_cleanup() {
while (cur != nullptr) {
last = cur;
cur = last->next;
free(last);
delete last;
}
image_list_start = image_list_end = nullptr;
}

View File

@ -249,8 +249,7 @@ static void update_mail_count(struct local_mail_s *mail) {
/* . and .. are skipped */
if (dirent->d_name[0] != '.') {
mail->mail_count++;
mailflags = static_cast<char *>(
malloc(sizeof(char) * strlen(strrchr(dirent->d_name, ','))));
mailflags = strdup(dirent->d_name);
if (mailflags == nullptr) {
NORM_ERR("malloc");
return;