mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-30 05:03:14 +00:00
dell: Don't return the address of a stack variable
Found using Coverity.
This commit is contained in:
parent
fec2480330
commit
4417c062fe
@ -31,6 +31,7 @@
|
|||||||
#include <smbios_c/smbios.h>
|
#include <smbios_c/smbios.h>
|
||||||
#include <smbios_c/smi.h>
|
#include <smbios_c/smi.h>
|
||||||
#include <smbios_c/obj/smi.h>
|
#include <smbios_c/obj/smi.h>
|
||||||
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
@ -183,7 +184,7 @@ fu_provider_dell_get_name (FuProvider *provider)
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_provider_dell_match_dock_component(const gchar *query_str,
|
fu_provider_dell_match_dock_component(const gchar *query_str,
|
||||||
const efi_guid_t **guid_out,
|
efi_guid_t *guid_out,
|
||||||
const gchar **name_out)
|
const gchar **name_out)
|
||||||
{
|
{
|
||||||
const DOCK_DESCRIPTION list[] = {
|
const DOCK_DESCRIPTION list[] = {
|
||||||
@ -200,7 +201,7 @@ fu_provider_dell_match_dock_component(const gchar *query_str,
|
|||||||
for (guint i = 0; i < G_N_ELEMENTS(list); i++) {
|
for (guint i = 0; i < G_N_ELEMENTS(list); i++) {
|
||||||
if (g_strcmp0 (query_str,
|
if (g_strcmp0 (query_str,
|
||||||
list[i].query) == 0) {
|
list[i].query) == 0) {
|
||||||
*guid_out = &list[i].guid;
|
memcpy (guid_out, &list[i].guid, sizeof (efi_guid_t));
|
||||||
*name_out = list[i].desc;
|
*name_out = list[i].desc;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -427,7 +428,7 @@ fu_provider_dell_device_added_cb (GUsbContext *ctx,
|
|||||||
g_autoptr(fu_dell_smi_obj) smi = NULL;
|
g_autoptr(fu_dell_smi_obj) smi = NULL;
|
||||||
gint result;
|
gint result;
|
||||||
guint32 location;
|
guint32 location;
|
||||||
const efi_guid_t *guid_raw = NULL;
|
efi_guid_t guid_raw;
|
||||||
efi_guid_t tmpguid;
|
efi_guid_t tmpguid;
|
||||||
gboolean old_ec = FALSE;
|
gboolean old_ec = FALSE;
|
||||||
|
|
||||||
@ -536,7 +537,7 @@ fu_provider_dell_device_added_cb (GUsbContext *ctx,
|
|||||||
if (!fu_provider_dell_dock_node (provider_dell,
|
if (!fu_provider_dell_dock_node (provider_dell,
|
||||||
device,
|
device,
|
||||||
buf.record->dock_info_header.dock_type,
|
buf.record->dock_info_header.dock_type,
|
||||||
guid_raw,
|
&guid_raw,
|
||||||
component_name,
|
component_name,
|
||||||
fw_str,
|
fw_str,
|
||||||
FALSE)) {
|
FALSE)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user