Commit 9cda1945 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix double free

parent 61817460
...@@ -86,9 +86,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -86,9 +86,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
PrefsItemData *data = NULL; PrefsItemData *data = NULL;
QTreeWidgetItem *current_item = NULL; QTreeWidgetItem *current_item = NULL;
unsigned confsize; unsigned confsize;
module_config_t *p_config; module_config_t *const p_config = module_GetConfig (p_module, &confsize);
p_config = module_GetConfig (p_module, &confsize);
for (size_t i = 0; i < confsize; i++) for (size_t i = 0; i < confsize; i++)
{ {
...@@ -193,7 +191,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -193,7 +191,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
unsigned i_subcategory = 0, i_category = 0, confsize; unsigned i_subcategory = 0, i_category = 0, confsize;
bool b_options = false; bool b_options = false;
module_config_t *p_config = module_GetConfig (p_module, &confsize); module_config_t *const p_config = module_GetConfig (p_module, &confsize);
for (size_t i = 0; i < confsize; i++) for (size_t i = 0; i < confsize; i++)
{ {
...@@ -346,7 +344,7 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -346,7 +344,7 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
} }
unsigned confsize; unsigned confsize;
module_config_t *p_config = module_GetConfig (p_module, &confsize), module_config_t *const p_config = module_GetConfig (p_module, &confsize),
*p_item = p_config, *p_item = p_config,
*p_end = p_config + confsize; *p_end = p_config + confsize;
...@@ -363,7 +361,6 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -363,7 +361,6 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
p_item++; p_item++;
} }
} }
module_PutConfig (p_config);
/* Widgets now */ /* Widgets now */
global_layout = new QVBoxLayout(); global_layout = new QVBoxLayout();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment