summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-10-16 10:40:43 +0000
committerphk <phk@FreeBSD.org>2002-10-16 10:40:43 +0000
commitce6f5fb18c303e71d0f39ab2faff14a89af6099a (patch)
tree9566edc4ba7c230420b2caecd4f96bbade8e9416 /sys/isa
parentabc97d30f63ea7a6f7848c39d7b3f6a1f44b66ed (diff)
downloadFreeBSD-src-ce6f5fb18c303e71d0f39ab2faff14a89af6099a.zip
FreeBSD-src-ce6f5fb18c303e71d0f39ab2faff14a89af6099a.tar.gz
Put an XXX: comment here to point out a couple of free() issues on
pnp_read_bytes(). Spotted by: FlexeLint
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/pnp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/isa/pnp.c b/sys/isa/pnp.c
index 08b614c..1007886 100644
--- a/sys/isa/pnp.c
+++ b/sys/isa/pnp.c
@@ -639,6 +639,10 @@ pnp_create_devices(device_t parent, pnp_id *p, int csn,
* bytes already in the buffer should be passed in '*lenp'. The memory
* allocated will be returned in '*resourcesp' with its size and the
* number of bytes of resources in '*spacep' and '*lenp' respectively.
+ *
+ * XXX: Multiple problems here, we forget to free() stuff in one
+ * XXX: error return, and in another case we free (*resourcesp) but
+ * XXX: don't tell the caller.
*/
static int
pnp_read_bytes(int amount, u_char **resourcesp, int *spacep, int *lenp)
OpenPOWER on IntegriCloud