Skip to content

Instantly share code, notes, and snippets.

@gahr
Created December 9, 2020 17:31
Show Gist options
  • Select an option

  • Save gahr/792caef0f44dc947377b942d66eab0da to your computer and use it in GitHub Desktop.

Select an option

Save gahr/792caef0f44dc947377b942d66eab0da to your computer and use it in GitHub Desktop.
diff --git a/imap/msn.c b/imap/msn.c
index cd8a8ef17..3e53a4a21 100644
--- a/imap/msn.c
+++ b/imap/msn.c
@@ -58,6 +58,11 @@ void imap_msn_reserve(struct MSN *msn, size_t num)
*/
void imap_msn_free(struct MSN *msn)
{
+ struct Email **ep = NULL;
+ ARRAY_FOREACH(ep, msn)
+ {
+ *ep = NULL;
+ }
ARRAY_FREE(msn);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment