]> git.proxmox.com Git - fwupd.git/commitdiff
ti-tps6598x: Fix a small memory leak when flashing new firmware
authorRichard Hughes <richard@hughsie.com>
Thu, 9 Feb 2023 17:10:47 +0000 (17:10 +0000)
committerMario Limonciello <mario.limonciello@amd.com>
Thu, 23 Feb 2023 19:04:11 +0000 (13:04 -0600)
plugins/ti-tps6598x/fu-ti-tps6598x-device.c

index a8bbf95f0109b68b3740f824e85dd024237855f4..acce3b7c35dc83789a23b59e38e0b0472eb86b92 100644 (file)
@@ -90,7 +90,7 @@ fu_ti_tps6598x_device_usbep_read(FuTiTps6598xDevice *self,
                                 guint8 length,
                                 GError **error)
 {
-       g_autoptr(GByteArray) buf = g_byte_array_new();
+       g_autoptr(GByteArray) buf = NULL;
 
        /* first byte is length */
        buf = fu_ti_tps6598x_device_usbep_read_raw(self, addr, length, error);