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/mailboxlist.c | |
| parent | 6d54a8a93311b6bb0eedae79cf4bde01d0955708 (diff) | |
| download | courier-libs-9457c2f56c7c8402d83153965a0951dafc2a4d18.tar.bz2 | |
Fix minor memory leaks
Diffstat (limited to 'imap/mailboxlist.c')
| -rw-r--r-- | imap/mailboxlist.c | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/imap/mailboxlist.c b/imap/mailboxlist.c index 41c873e..ce6cf55 100644 --- a/imap/mailboxlist.c +++ b/imap/mailboxlist.c @@ -96,7 +96,8 @@ const char *maildir_shared_index_file()  		if (p && *p)  		{ -			const char *q=auth_getoptionenv("sharedgroup"); +			char *opt=auth_getoptionenv("sharedgroup"); +			const char *q=opt;  			if (!q) q=""; @@ -106,6 +107,8 @@ const char *maildir_shared_index_file()  				write_error_exit(0);  			strcat(strcpy(filenamep, p), q); +			if (opt) +				free(opt);  		}  	} | 
