diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1999-10-14 15:13:54 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1999-10-14 15:13:54 +0000 |
commit | edd53e700cdc5e72813686b1903c0d98415d0248 (patch) | |
tree | a579cab34b5c13a8009fd915e467810caaed1487 /pattern.c | |
parent | bb008e2a49839e33763dc10afce02581189c6b8a (diff) |
Fix a segmentation fault when search PGP-encrypted messages.
Diffstat (limited to 'pattern.c')
-rw-r--r-- | pattern.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -164,8 +164,11 @@ msg_search (CONTEXT *ctx, regex_t *rx, char *buf, size_t blen, int op, int msgno if (h->pgp & PGPENCRYPT && !pgp_valid_passphrase()) { mx_close_message (&msg); - fclose (fp); - unlink (tempfile); + if (fp) + { + fclose (fp); + unlink (tempfile); + } return (0); } #endif |