Don't free subtype field unconditionally.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 13 lines · Xen patchbot -unstable
# HG changeset patch
# User [email protected]
# Node ID8d69cb2d4a8889780930fff0374559839fb6cdfb# Parent2f09b40595eafd845433d1a25366df59eeb4b6b2Don't free subtype field unconditionally.Signed-off-by Christian Limpach <[email protected]>diff -r
2f09b40595ea-r8d69cb2d4a88linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c---a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.cThu Aug 18
19:06:51 2005 +++b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.cThu Aug 18
19:07:29 2005 @@ -262,7 +262,8 @@
Review
Quoted 9 lines
(quoted diff) +2
-1if (dev) { struct xenbus_device *xendev = to_xenbus_device(dev); - kfree(xendev->subtype); + if (xendev->subtype) + kfree(xendev->subtype); kfree(xendev); } }
I don't think this change is necessary. kfree already guards against NULL pointers, and I have seen many patches in exactly the opposite direction (removing pre-kfree tests).
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
Quoted 3 lines · Hollis Blanchard
I don't think this change is necessary. kfree already guards against NULL pointers, and I have seen many patches in exactly the opposite direction (removing pre-kfree tests).
this code was removed few commits later.
Signature · 1 line
Vincent Hanquez