Permalink
Browse files

Fix minor memory leak spotted by coverity

  • Loading branch information...
stuartm committed May 9, 2012
1 parent b989db6 commit a68210ce582791ba3847196f5c8b6b98d63390e4
Showing with 4 additions and 8 deletions.
  1. +4 −8 mythtv/libs/libmyth/programinfo.cpp
@@ -2243,14 +2243,10 @@ QString ProgramInfo::GetPlaybackURL(
{
host = list.size() == 1 ? list[0] : list[1];
group = list.size() == 1 ? QString() : list[0];
- StorageGroup *sg = new StorageGroup(group, host);
- if (sg)
- {
- QString local = sg->FindFile(path);
- if (!local.isEmpty())
- if (sg->FileExists(local))
- return local;
- }
+ StorageGroup sg = StorageGroup(group, host);
+ QString local = sg.FindFile(path);
+ if (!local.isEmpty() && sg.FileExists(local))
+ return local;
}
}
return fullpath;

0 comments on commit a68210c

Please sign in to comment.