forked from Imagelibrary/rtems
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!
This commit is contained in:
@@ -338,7 +338,6 @@ __rtems_close(
|
||||
return -1;
|
||||
}
|
||||
status = (*fp)(fd);
|
||||
rtems_libio_free(iop);
|
||||
return status;
|
||||
}
|
||||
iop = rtems_libio_iop(fd);
|
||||
|
||||
@@ -338,7 +338,6 @@ __rtems_close(
|
||||
return -1;
|
||||
}
|
||||
status = (*fp)(fd);
|
||||
rtems_libio_free(iop);
|
||||
return status;
|
||||
}
|
||||
iop = rtems_libio_iop(fd);
|
||||
|
||||
@@ -338,7 +338,6 @@ __rtems_close(
|
||||
return -1;
|
||||
}
|
||||
status = (*fp)(fd);
|
||||
rtems_libio_free(iop);
|
||||
return status;
|
||||
}
|
||||
iop = rtems_libio_iop(fd);
|
||||
|
||||
Reference in New Issue
Block a user