mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-05 09:53:03 +00:00
trivial: Fix a tiny memory leak when writing DfuSe images
Found using Coverity, many thanks.
This commit is contained in:
parent
df5652ffb5
commit
dc3856b51d
@ -282,7 +282,7 @@ dfu_firmware_to_dfuse (DfuFirmware *firmware, GError **error)
|
||||
guint i;
|
||||
guint32 image_size_total = 0;
|
||||
guint32 offset = sizeof (DfuSePrefix);
|
||||
guint8 *buf;
|
||||
g_autofree guint8 *buf = NULL;
|
||||
g_autoptr(GPtrArray) dfuse_images = NULL;
|
||||
|
||||
/* get all the image data */
|
||||
@ -325,7 +325,7 @@ dfu_firmware_to_dfuse (DfuFirmware *firmware, GError **error)
|
||||
}
|
||||
|
||||
/* return blob */
|
||||
return g_bytes_new_take (buf, sizeof (DfuSePrefix) + image_size_total);
|
||||
return g_bytes_new (buf, sizeof (DfuSePrefix) + image_size_total);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user