Skip to content

Commit

Permalink
dfu: Fix a trivial memory leak introduced in the last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsie committed May 12, 2022
1 parent 3047ed1 commit 1846b36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/dfu/fu-dfu-target.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,9 @@ fu_dfu_target_setup(FuDfuTarget *self, GError **error)
/* get string */
if (priv->alt_idx != 0x00 && fu_device_get_logical_id(FU_DEVICE(self)) == NULL) {
GUsbDevice *usb_device = fu_usb_device_get_dev(FU_USB_DEVICE(device));
fu_device_set_logical_id(
FU_DEVICE(self),
g_usb_device_get_string_descriptor(usb_device, priv->alt_idx, NULL));
g_autofree gchar *alt_name = NULL;
alt_name = g_usb_device_get_string_descriptor(usb_device, priv->alt_idx, NULL);
fu_device_set_logical_id(FU_DEVICE(self), alt_name);
}

/* parse the DfuSe format according to UM0424 */
Expand Down

0 comments on commit 1846b36

Please sign in to comment.