Permalink
Browse files

DBUtil:: Fix coverity ID 746742 Unchecked return value from library

In DBUtil::CreateTemporaryDBConf(): Value returned from a library function is
not checked for errors before being used. This value may indicate an error
condition.
  • Loading branch information...
Paul Harrison
Paul Harrison committed Jun 8, 2013
1 parent 30a7f50 commit bf109e41e4ea192a6587a6260ba129e789af0c5f
Showing with 5 additions and 1 deletion.
  1. +5 −1 mythtv/libs/libmythbase/dbutil.cpp
@@ -544,7 +544,11 @@ bool DBUtil::CreateTemporaryDBConf(
}
else
{
chmod(tmpfile.constData(), S_IRUSR);
if (chmod(tmpfile.constData(), S_IRUSR))
{
LOG(VB_GENERAL, LOG_ERR, LOC + QString("Error changing permissions '%1'")
.arg(tmpfile.constData()) + ENO);
}
QByteArray outarr = privateinfo.toLocal8Bit();
fprintf(fp, "%s", outarr.constData());

0 comments on commit bf109e4

Please sign in to comment.