Skip to content

Commit

Permalink
gmime-test: fix leak
Browse files Browse the repository at this point in the history
  • Loading branch information
djcb committed Jun 11, 2023
1 parent 713bb4e commit ecf87c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mu/tests/gmime-test.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
** Copyright (C) 2011-2021 Dirk-Jan C. Binnema <[email protected]>
** Copyright (C) 2011-2023 Dirk-Jan C. Binnema <[email protected]>
**
** This program is free software; you can redistribute it and/or modify it
** under the terms of the GNU General Public License as published by the
Expand Down Expand Up @@ -58,8 +58,12 @@ get_refs_str(GMimeMessage* msg)
refs_len = g_mime_references_length(mime_refs);
for (rv = NULL, i = 0; i < refs_len; ++i) {
const char* msgid;
char *tmp;

msgid = g_mime_references_get_message_id(mime_refs, i);
tmp = rv;
rv = g_strdup_printf("%s%s%s", rv ? rv : "", rv ? "," : "", msgid);
g_free(tmp);
}
g_mime_references_free(mime_refs);

Expand Down

0 comments on commit ecf87c5

Please sign in to comment.