diff options
| author | Sam Varshavchik | 2022-01-15 23:14:47 -0500 |
|---|---|---|
| committer | Sam Varshavchik | 2022-01-15 23:44:03 -0500 |
| commit | 9457c2f56c7c8402d83153965a0951dafc2a4d18 (patch) | |
| tree | 43f8c38a863929a560f549b8b7ca57733899cce6 /imap/storeinfo.c | |
| parent | 6d54a8a93311b6bb0eedae79cf4bde01d0955708 (diff) | |
| download | courier-libs-9457c2f56c7c8402d83153965a0951dafc2a4d18.tar.bz2 | |
Fix minor memory leaks
Diffstat (limited to 'imap/storeinfo.c')
| -rw-r--r-- | imap/storeinfo.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/imap/storeinfo.c b/imap/storeinfo.c index de885e9..cc31c31 100644 --- a/imap/storeinfo.c +++ b/imap/storeinfo.c @@ -221,6 +221,7 @@ int kwAllowed=1; else { struct libmail_kwMessage *kw; + struct libmail_kwMessage *si_kw; new_flags=si->flags; @@ -229,12 +230,16 @@ int kwAllowed=1; if (kw && kw->firstEntry == NULL) kw=NULL; - if (si->keywords && si->keywords->firstEntry == NULL) - si->keywords=NULL; + si_kw=si->keywords; + + if (si_kw && si_kw->firstEntry == NULL) + { + si_kw=NULL; + } - if ((si->keywords && !kw) || - (!si->keywords && kw) || - (si->keywords && kw && libmail_kwmCmp(si->keywords, kw))) + if ((si_kw && !kw) || + (!si_kw && kw) || + (si_kw && kw && libmail_kwmCmp(si_kw, kw))) { if (kwAllowed) { |
