1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-28 13:00:45 +00:00

Fix order of freeing memory

This commit is contained in:
Mithil Poojary 2020-10-03 03:30:14 +05:30 committed by Brenden Matthews
parent 87a31ba039
commit b97eff4dbe

View File

@ -350,11 +350,11 @@ static void mbox_scan(char *args, char *output, size_t max_len) {
} }
strncat(output, buf, max_len - strlen(output)); strncat(output, buf, max_len - strlen(output));
tmp = curr; tmp = curr->previous;
curr = curr->previous; free(curr->from);
free(tmp->from); free(curr->subject);
free(tmp->subject); free(curr);
free(tmp); curr = tmp;
i--; i--;
} }