From 8f367d6baae86155770b61756321277905f64fcb Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 19 Sep 1997 18:31:05 +0000 Subject: Bug fix from Eric Norum: After weeks of trying to figure why my RTEMS/KASQ server crashes now and then I found a nasty bug I introduced in adding multiple-driver support to libio. The bug only affects `add-on' driver classes (like the networking code). Old-style file descriptors were not affected. The bug cleared 32 bytes of memory (unspecified location) whenever a `close' of a socket was performed! I was clearing an IOP I hadn't allocated -- and the pointer wasn't initiallized, either! --- c/src/exec/libcsupport/src/libio.c | 1 - c/src/lib/libc/libio.c | 1 - cpukit/libcsupport/src/libio.c | 1 - 3 files changed, 3 deletions(-) diff --git a/c/src/exec/libcsupport/src/libio.c b/c/src/exec/libcsupport/src/libio.c index cd66b3d1d4..83253a7903 100644 --- a/c/src/exec/libcsupport/src/libio.c +++ b/c/src/exec/libcsupport/src/libio.c @@ -338,7 +338,6 @@ __rtems_close( return -1; } status = (*fp)(fd); - rtems_libio_free(iop); return status; } iop = rtems_libio_iop(fd); diff --git a/c/src/lib/libc/libio.c b/c/src/lib/libc/libio.c index cd66b3d1d4..83253a7903 100644 --- a/c/src/lib/libc/libio.c +++ b/c/src/lib/libc/libio.c @@ -338,7 +338,6 @@ __rtems_close( return -1; } status = (*fp)(fd); - rtems_libio_free(iop); return status; } iop = rtems_libio_iop(fd); diff --git a/cpukit/libcsupport/src/libio.c b/cpukit/libcsupport/src/libio.c index cd66b3d1d4..83253a7903 100644 --- a/cpukit/libcsupport/src/libio.c +++ b/cpukit/libcsupport/src/libio.c @@ -338,7 +338,6 @@ __rtems_close( return -1; } status = (*fp)(fd); - rtems_libio_free(iop); return status; } iop = rtems_libio_iop(fd); -- cgit v1.2.3