RTEMS | posix/lio_listio.c: Missing a release of a lock on a path. (#5127)
Alessandro Nardin (@AlessandroNardin)
gitlab at rtems.org
Sat Sep 14 09:10:14 UTC 2024
Alessandro Nardin created an issue: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5127
## Summary
Coverity CID 1619145
Coverity notes that there are path in `lio_listio()` where the function return without freeing some memory.
```
** CID 1619145: (LOCK)
/cpukit/posix/src/lio_listio.c: 175 in lio_listio()
/cpukit/posix/src/lio_listio.c: 206 in lio_listio()
________________________________________________________________________________________________________
*** CID 1619145: (LOCK)
/cpukit/posix/src/lio_listio.c: 175 in lio_listio()
169 }
170 }
171 rtems_aio_completed_list_op( listcbp );
172
173 if ( mode == LIO_NOWAIT ) {
174 if ( error == 1 ) {
>>> CID 1619145: (LOCK)
>>> Returning without unlocking "listcbp->mutex".
175 rtems_set_errno_and_return_minus_one( EIO );
176 }
177 } else if ( mode == LIO_WAIT ) {
178 rtems_event_set event_out;
179 rtems_event_system_receive(
180 RTEMS_EVENT_SYSTEM_AIO_LIST,
/cpukit/posix/src/lio_listio.c: 206 in lio_listio()
200 }
201 }
202 }
203 }
204 }
205
>>> CID 1619145: (LOCK)
>>> Returning without unlocking "listcbp->mutex".
206 return 0;
```
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5127
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240914/2864d801/attachment.htm>
More information about the bugs
mailing list