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 9743559 commit 301226c
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 301226c

Please sign in to comment.