#1411 closed defect (fixed)

typo in rtems_workspace_allocate

Reported by: Nickolay Semyonov-Kolchin Owned by: Joel Sherrill
Priority: normal Milestone: 4.10
Component: score Version: 4.9
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

Our partners found that cpukit/rtems/src/workspace.c:rtems_workspace_allocate contain incorrect pointer check.

bool rtems_workspace_allocate(

size_t bytes,
void pointer

)
{

*pointer = _Heap_Allocate( &_Workspace_Area, bytes );
if (!pointer)

return false;

else

return true;

}

the '!pointer' check is useless. Probably '*pointer == 0' should be used.

This bug is present in RTEMS 4.9 and current CVS.

Attachments (2)

wk.patch (506 bytes) - added by Nickolay Semyonov-Kolchin on 05/13/09 at 10:18:52.
trivial patch
pr1411.diff (4.5 KB) - added by Joel Sherrill on 05/13/09 at 15:49:43.
Patch for 4.10 and 4.9

Download all attachments as: .zip

Change History (4)

Changed on 05/13/09 at 10:18:52 by Nickolay Semyonov-Kolchin

Attachment: wk.patch added

trivial patch

Changed on 05/13/09 at 15:49:43 by Joel Sherrill

Attachment: pr1411.diff added

Patch for 4.10 and 4.9

comment:1 Changed on 05/13/09 at 15:49:43 by Joel Sherrill

attachments.isobsolete: 01

comment:2 Changed on 05/13/09 at 16:02:37 by Joel Sherrill

Resolution: fixed
Status: newclosed

Patch committed. PR closed.

Note: See TracTickets for help on using tickets.