Skip to content

Commit

Permalink
snarf: If sstorage is NULL, do not allocate box
Browse files Browse the repository at this point in the history
Old code would continue if sstorage was NULL.

Found by static analyzer
  • Loading branch information
cmouse authored and mrannanj committed Feb 20, 2018
1 parent 5f6be61 commit a9c19bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/snarf/snarf-plugin.c
Expand Up @@ -151,7 +151,7 @@ static void snarf_mailbox_allocated(struct mailbox *box)

if (!box->inbox_user)
return;
if (sstorage != NULL && sstorage->snarfing_disabled)
if (sstorage == NULL || sstorage->snarfing_disabled)
return;

if (!snarf_box_find(box->storage->user, &snarf_list, &snarf_name))
Expand Down

0 comments on commit a9c19bb

Please sign in to comment.