summaryrefslogtreecommitdiffstats
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorThomas Pugliese <thomas.pugliese@gmail.com>2013-09-26 14:08:14 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-26 16:31:36 -0700
commitffd6d17ddb1bea8267ee3edf6032fc6aa777e832 (patch)
treec27abec7bb059be740d6555c4a2e84430ff4df52 /include/linux/debugobjects.h
parentd993670ca97f646db1ef9b345e78ecfd3d6f0143 (diff)
downloadcachepc-linux-ffd6d17ddb1bea8267ee3edf6032fc6aa777e832.tar.gz
cachepc-linux-ffd6d17ddb1bea8267ee3edf6032fc6aa777e832.zip
usb: wusbcore: resource cleanup fix in __wa_xfer_setup_segs
This patch updates __wa_xfer_setup_segs error path to only clean up the xfer->seg entry that it failed to create and then set that entry to NULL. wa_xfer_destroy will clean up the remaining xfer->segs that were fully created. It also moves the code to create the dto sg list to an out of line function to make __wa_xfer_setup_segs easier to read. Prior to this change, __wa_xfer_setup_segs would clean up all entries in the xfer->seg array in case of an error but it did not set them to NULL. This resulted in a double free when wa_xfer_destroy was eventually called by the higher level error handler. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions