Skip to content

Commit

Permalink
tls: fix memory leak in tls_prune_sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
elliefm committed Dec 6, 2017
1 parent 1e7cf05 commit 575b6b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions imap/tls.c
Expand Up @@ -1387,17 +1387,17 @@ EXPORTED int tls_prune_sessions(void)
}
else if (ret == CYRUSDB_NOTFOUND) {
syslog(LOG_NOTICE, "tls_prune: %s not found, nothing to do", fname);
return 0;
ret = 0;
}
else {
syslog(LOG_ERR, "DBERROR: opening %s: %s",
fname, cyrusdb_strerror(ret));
return 1;
}

free(tofree);
if (tofree)
free(tofree);

return 0;
return ret;
}

/* fill string buffer with info about tls connection */
Expand Down

0 comments on commit 575b6b4

Please sign in to comment.