From 976942da2365a7a2ed596c6043442b5a51662fb1 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Mon, 29 Mar 2004 16:55:23 -0800 Subject: [PATCH] [PATCH] USB: usb/core/config.c null pointers after kfree Prevents an oops with some other patchsets. Clear some pointers after the memory is kfreed, to avoid making some other patch combinations oops. --- drivers/usb/core/config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 45beca0b98d95..5f24e9ce170dd 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -367,6 +367,7 @@ void usb_destroy_configuration(struct usb_device *dev) kfree(dev->rawdescriptors[i]); kfree(dev->rawdescriptors); + dev->rawdescriptors = 0; } for (c = 0; c < dev->descriptor.bNumConfigurations; c++) { @@ -380,6 +381,7 @@ void usb_destroy_configuration(struct usb_device *dev) } } kfree(dev->config); + dev->config = 0; } -- 2.53.0