Skip to content

Commit

Permalink
lib-imap: imap_match_deinit(NULL) should be a no-op
Browse files Browse the repository at this point in the history
  • Loading branch information
cmouse authored and sirainen committed Jun 13, 2018
1 parent 28983eb commit 3f310ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib-imap/imap-match.c
Expand Up @@ -172,6 +172,8 @@ imap_match_init_multiple(pool_t pool, const char *const *patterns,

void imap_match_deinit(struct imap_match_glob **glob)
{
if (glob == NULL || *glob == NULL)
return;
p_free((*glob)->pool, (*glob)->patterns);
p_free((*glob)->pool, *glob);
*glob = NULL;
Expand Down

0 comments on commit 3f310ab

Please sign in to comment.