Fixes to Coverity issues 72736 & 72735
This commit is contained in:
@ -216,7 +216,6 @@ int skygw_rwlock_destroy(
|
|||||||
}
|
}
|
||||||
/** Clean the struct */
|
/** Clean the struct */
|
||||||
rwlock->srw_rwlock_thr = 0;
|
rwlock->srw_rwlock_thr = 0;
|
||||||
rwlock->srw_rwlock = NULL;
|
|
||||||
/** Unlock */
|
/** Unlock */
|
||||||
pthread_rwlock_unlock(rwlock->srw_rwlock);
|
pthread_rwlock_unlock(rwlock->srw_rwlock);
|
||||||
/** Destroy */
|
/** Destroy */
|
||||||
@ -227,6 +226,10 @@ int skygw_rwlock_destroy(
|
|||||||
err,
|
err,
|
||||||
strerror(err));
|
strerror(err));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rwlock->srw_rwlock = NULL;
|
||||||
|
}
|
||||||
retblock:
|
retblock:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
@ -1898,14 +1901,16 @@ void skygw_file_done(
|
|||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"* Closing file %s failed : %s.\n",
|
"* Closing file %s failed : %s.\n",
|
||||||
file->sf_fname,
|
file->sf_fname,
|
||||||
strerror(err));
|
strerror(errno));
|
||||||
}
|
}
|
||||||
ss_dassert(err == 0);
|
else
|
||||||
|
{
|
||||||
ss_dfprintf(stderr, "Closed %s\n", file->sf_fname);
|
ss_dfprintf(stderr, "Closed %s\n", file->sf_fname);
|
||||||
free(file->sf_fname);
|
free(file->sf_fname);
|
||||||
free(file);
|
free(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user