From 9114299df972f43bef08e64da81fe39896334a81 Mon Sep 17 00:00:00 2001 From: Roman Kalashnikov Date: Mon, 30 Oct 2017 00:56:32 +0300 Subject: Fixed possible memory leak (#201) Warnings, found using PVS-Studio: hardinfo/modules/devices/usb.c 397 err V773 The function was exited without releasing the 'temp' pointer. A memory leak is possible. hardinfo/modules/computer/uptime.c 33 err V773 The function was exited without releasing the 'ui' pointer. A memory leak is possible. --- modules/devices/usb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/devices') diff --git a/modules/devices/usb.c b/modules/devices/usb.c index e5088bd2..9366c7ce 100644 --- a/modules/devices/usb.c +++ b/modules/devices/usb.c @@ -394,6 +394,7 @@ gboolean __scan_usb_lsusb(void) if (!temp_lsusb) { DEBUG("cannot create temporary file for lsusb"); pclose(lsusb); + g_free(temp); return FALSE; } -- cgit v1.2.3