firewire: fix NULL pointer deref. and resource leak
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Wed, 20 Feb 2008 20:10:06 +0000 (21:10 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Thu, 21 Feb 2008 18:05:56 +0000 (19:05 +0100)
commitfae603121428ba83b7343c88e68a7144525ab3eb
tree41283a905b089cee26103187e54935abffb88207
parent09d7328e62e3b4cefe4bf3eeeeacb54f62a7ae5c
firewire: fix NULL pointer deref. and resource leak

By supplying ioctl()s in the wrong order, a userspace client was able to
trigger NULL pointer dereferences.  Furthermore, by calling
ioctl_create_iso_context more than once, new contexts could be created
without ever freeing the previously created contexts.

Thanks to Anders Blomdell for the report.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-cdev.c