ChangeSet 1.1673.8.45, 2004/03/30 08:55:23-08:00, [EMAIL PROTECTED]

[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 files changed, 2 insertions(+)


diff -Nru a/drivers/usb/core/config.c b/drivers/usb/core/config.c
--- a/drivers/usb/core/config.c Wed Apr 14 14:36:25 2004
+++ b/drivers/usb/core/config.c Wed Apr 14 14:36:25 2004
@@ -367,6 +367,7 @@
                        kfree(dev->rawdescriptors[i]);
 
                kfree(dev->rawdescriptors);
+               dev->rawdescriptors = 0;
        }
 
        for (c = 0; c < dev->descriptor.bNumConfigurations; c++) {
@@ -380,6 +381,7 @@
                }
        }
        kfree(dev->config);
+       dev->config = 0;
 }
 
 



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to