Skip to contentSkip to conversation

Resource leak fix for whiteheat driver

PATCH New Jesper Juhl 1 participant 1 message Apr 23, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Resource leak fix for whiteheat driver

We may return from drivers/usb/serial/whiteheat.c::whiteheat_attach() without freeing `result' if we leave via the no_firmware: label.

Spotted by the coverity checker as #670

---

 drivers/usb/serial/whiteheat.c |    1 +
 1 files changed, 1 insertion(+)
drivers/usb/serial/whiteheat.c +1 -0
@@ -508,6 +508,7 @@ no_firmware:
 	err("%s: Unable to retrieve firmware version, try replugging\n", serial->type->description);
 	err("%s: If the firmware is not running (status led not blinking)\n", serial->type->description);
 	err("%s: please contact [email protected]\n", serial->type->description);
+	kfree(result);
 	return -ENODEV;
 
 no_command_private: