summaryrefslogtreecommitdiffstats
path: root/buffy.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2000-02-07 12:52:51 +0000
committerThomas Roessler <roessler@does-not-exist.org>2000-02-07 12:52:51 +0000
commit6ff2f98e94b5ccaddbb001c87d04ec59d519fa33 (patch)
tree6fab658c9f1b960ad4647bf1cc8bc15297dd1f53 /buffy.c
parent9bcf8fbbf82f461d6c997203653a94be1ada2dd9 (diff)
Fix a NULL pointer deference.
Diffstat (limited to 'buffy.c')
-rw-r--r--buffy.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/buffy.c b/buffy.c
index 981c4d93..2ae0bbee 100644
--- a/buffy.c
+++ b/buffy.c
@@ -118,9 +118,11 @@ int test_new_folder (const char *path)
if (typ != M_MBOX && typ != M_MMDF && typ != M_KENDRA)
return 0;
- f = fopen (path, "rb");
- rc = test_last_status_new (f);
- fclose (f);
+ if ((f = fopen (path, "rb")))
+ {
+ rc = test_last_status_new (f);
+ fclose (f);
+ }
return rc;
}