Skip to content

Commit aae9d56

Browse files
tititiou36lucacoelho
authored andcommitted
iwlwifi: mvm: Fix a memory leak in an error handling path in 'iwl_mvm_sar_get_wgds_table()'
We should free 'wgds.pointer' here as done a few lines above in another error handling path. It was allocated within 'acpi_evaluate_object()'. Fixes: c52030a01ccc ("iwlwifi: mvm: add GEO_TX_POWER_LIMIT cmd for geographic tx power table") Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
1 parent 368bd88 commit aae9d56

File tree

1 file changed

+4
-2
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+4
-2
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/fw.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,8 +1275,10 @@ static int iwl_mvm_sar_get_wgds_table(struct iwl_mvm *mvm)
12751275

12761276
entry = &wifi_pkg->package.elements[idx++];
12771277
if ((entry->type != ACPI_TYPE_INTEGER) ||
1278-
(entry->integer.value > U8_MAX))
1279-
return -EINVAL;
1278+
(entry->integer.value > U8_MAX)) {
1279+
ret = -EINVAL;
1280+
goto out_free;
1281+
}
12801282

12811283
mvm->geo_profiles[i].values[j] = entry->integer.value;
12821284
}

0 commit comments

Comments
 (0)