extcap: Fix some leaks of argument settings

This commit is contained in:
John Thacker 2024-02-01 17:39:13 -05:00 committed by AndersBroman
parent 15c4bccee1
commit b69943609a
2 changed files with 6 additions and 1 deletions

View File

@ -1563,6 +1563,9 @@ capture_opts_free_interface_t(interface_t *device)
if (device->if_info.caps) {
free_if_capabilities(device->if_info.caps);
}
if (device->external_cap_args_settings) {
g_hash_table_unref(device->external_cap_args_settings);
}
}
}

View File

@ -564,7 +564,7 @@ void ExtcapOptionsDialog::resetValues()
GHashTable *ExtcapOptionsDialog::getArgumentSettings(bool useCallsAsKey, bool includeEmptyValues)
{
GHashTable * entries = g_hash_table_new(g_str_hash, g_str_equal);
GHashTable * entries = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
ExtcapArgumentList::const_iterator iter;
QString value;
@ -642,6 +642,8 @@ void ExtcapOptionsDialog::storeValues()
mainApp->emitAppSignal(MainApplication::PreferencesChanged);
}
g_hash_table_unref(entries);
}
ExtcapValueList ExtcapOptionsDialog::loadValuesFor(int argNum, QString argumentName, QString parent)