Skip to content

Commit

Permalink
seen_db:seen_merge_cb() memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
dilyanpalauzov committed Sep 23, 2023
1 parent 6de6937 commit 6f77d66
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions imap/seen_db.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ static int seen_merge_cb(void *rockp,
dirty = 1; /* no record */
}
else {
seen_freedata(&oldsd);
if (newsd.lastuid > oldsd.lastuid) dirty = 1;
if (newsd.lastread > oldsd.lastread) dirty = 1;
}
Expand All @@ -506,6 +507,7 @@ static int seen_merge_cb(void *rockp,
/* write back data from new entry */
r = seen_write(seendb, uniqueid, &newsd);
}
seen_freedata(&newsd);

free(uniqueid);

Expand Down

0 comments on commit 6f77d66

Please sign in to comment.