Address Coverity errors

Fixed an uninitialized member, misordered NULL check, resource leak,
and unconsumed return value.
This commit is contained in:
Andrew Gaul
2015-08-05 22:05:52 -07:00
parent cbc057bca7
commit 8ee71caabb
4 changed files with 12 additions and 6 deletions

View File

@ -491,7 +491,7 @@ void PageList::Dump(void)
// FdEntity methods
//------------------------------------------------
FdEntity::FdEntity(const char* tpath, const char* cpath)
: is_lock_init(false), path(SAFESTRPTR(tpath)), cachepath(SAFESTRPTR(cpath)), fd(-1), file(NULL), is_modify(false)
: is_lock_init(false), refcnt(0), path(SAFESTRPTR(tpath)), cachepath(SAFESTRPTR(cpath)), fd(-1), file(NULL), is_modify(false)
{
try{
pthread_mutex_init(&fdent_lock, NULL);