From: Richard Hughes Date: Thu, 9 Feb 2023 17:10:47 +0000 (+0000) Subject: ti-tps6598x: Fix a small memory leak when flashing new firmware X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=2b60028a975380e57ca048a29e317673bbbb4cb2;p=fwupd.git ti-tps6598x: Fix a small memory leak when flashing new firmware --- diff --git a/plugins/ti-tps6598x/fu-ti-tps6598x-device.c b/plugins/ti-tps6598x/fu-ti-tps6598x-device.c index a8bbf95f0..acce3b7c3 100644 --- a/plugins/ti-tps6598x/fu-ti-tps6598x-device.c +++ b/plugins/ti-tps6598x/fu-ti-tps6598x-device.c @@ -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);