Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[ssu] Fix memory leak on SsuDeviceInfo. Fixes JB#27777
  • Loading branch information
pvuorela committed Oct 10, 2016
1 parent 5f9af91 commit 3321d4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libssu/ssudeviceinfo.cpp
Expand Up @@ -25,12 +25,16 @@

SsuDeviceInfo::SsuDeviceInfo(QString model): QObject()
{

boardMappings = new SsuSettings(SSU_BOARD_MAPPING_CONFIGURATION, SSU_BOARD_MAPPING_CONFIGURATION_DIR);
if (!model.isEmpty())
cachedModel = model;
}

SsuDeviceInfo::~SsuDeviceInfo()
{
delete boardMappings;
}

QStringList SsuDeviceInfo::adaptationRepos()
{
QStringList result;
Expand Down
3 changes: 3 additions & 0 deletions libssu/ssudeviceinfo.h
Expand Up @@ -23,6 +23,9 @@ class SsuDeviceInfo: public QObject
* Initialize with device to override autodetection
*/
SsuDeviceInfo(QString model = "");

virtual ~SsuDeviceInfo();

/**
* Return the list of adaptations used for the set model
*/
Expand Down

0 comments on commit 3321d4a

Please sign in to comment.