Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1856 from kylhill/master

Fix Remaining Coverity Static Analysis Warnings in XBMC
  • Loading branch information...
commit b6c393b1d79d0c70d75e84f02e0950550959069a 2 parents 8f0d270 + 9dbe48d
jmarshallnz jmarshallnz authored
4 xbmc/dialogs/GUIDialogMediaSource.cpp
View
@@ -165,8 +165,7 @@ bool CGUIDialogMediaSource::ShowAndAddMediaSource(const CStdString &type)
bool CGUIDialogMediaSource::ShowAndEditMediaSource(const CStdString &type, const CStdString&share)
{
- VECSOURCES* pShares=NULL;
-
+ VECSOURCES* pShares = g_settings.GetSourcesFromType(type);
if (pShares)
{
for (unsigned int i=0;i<pShares->size();++i)
@@ -175,7 +174,6 @@ bool CGUIDialogMediaSource::ShowAndEditMediaSource(const CStdString &type, const
return ShowAndEditMediaSource(type,(*pShares)[i]);
}
}
-
return false;
}
4 xbmc/interfaces/legacy/CallbackHandler.cpp
View
@@ -145,11 +145,11 @@ namespace XBMCAddon
#ifdef ENABLE_TRACE_API
CLog::Log(LOGDEBUG,"%sNEWADDON removing callback 0x%lx for PyThreadState 0x%lx from queue", _tg.getSpaces(),(long)(p->cb.get()) ,(long)userData);
#endif
- g_callQueue.erase(iter);
+ iter = g_callQueue.erase(iter);
}
else
iter++;
- }
+ }
}
}
1  xbmc/music/tags/TagLoaderTagLib.cpp
View
@@ -152,6 +152,7 @@ bool CTagLoaderTagLib::Load(const string& strFileName, CMusicInfoTag& tag, Embed
if (!file || !file->isValid())
{
delete file;
+ oggFlacFile = NULL;
file = oggVorbisFile = new Ogg::Vorbis::File(stream);
}
}
4 xbmc/network/WebServer.cpp
View
@@ -395,7 +395,11 @@ int CWebServer::CreateFileDownloadResponse(struct MHD_Connection *connection, co
&CWebServer::ContentReaderCallback, file,
&CWebServer::ContentReaderFreeCallback);
if (response == NULL)
+ {
+ file->Close();
+ delete file;
return MHD_NO;
+ }
}
else
{
2  xbmc/network/linux/ZeroconfAvahi.cpp
View
@@ -387,7 +387,7 @@ void CZeroconfAvahi::addService(tServiceMap::mapped_type fp_service_info, AvahiC
{
if ((ret = avahi_entry_group_add_service_strlst(fp_service_info->mp_group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AvahiPublishFlags(0),
fp_service_info->m_name.c_str(),
- fp_service_info->m_type.c_str(), NULL, NULL, fp_service_info->m_port, fp_service_info->mp_txt) < 0))
+ fp_service_info->m_type.c_str(), NULL, NULL, fp_service_info->m_port, fp_service_info->mp_txt)) < 0)
{
if (ret == AVAHI_ERR_COLLISION)
{
3  xbmc/utils/BitstreamConverter.cpp
View
@@ -535,7 +535,10 @@ void CBitstreamConverter::Close(void)
m_sps_pps_context.sps_pps_data = NULL;
}
if(m_convertBuffer)
+ {
free(m_convertBuffer);
+ m_convertBuffer = NULL;
+ }
m_convertSize = 0;
}
Please sign in to comment.
Something went wrong with that request. Please try again.