Changeset d3231fba in rtems


Ignore:
Timestamp:
Jan 19, 2010, 10:09:20 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
e4d7016c
Parents:
b2ac8a9
Message:

2010-01-19 Joel Sherrill <joel.sherrill@…>

Coverity Id 24

  • libblock/src/ide_part_table.c: Initialize sector to NULL and add free(sector) on error return path from get_sector() to fix potential leak.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rb2ac8a9 rd3231fba  
     12010-01-19      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        Coverity Id 24
     4        * libblock/src/ide_part_table.c: Initialize sector to NULL and add
     5        free(sector) on error return path from get_sector() to fix potential
     6        leak.
     7
    182010-01-19      Joel Sherrill <joel.sherrill@oarcorp.com>
    29
  • cpukit/libblock/src/ide_part_table.c

    rb2ac8a9 rd3231fba  
    318318{
    319319    int                  part_num;
    320     rtems_sector_data_t *sector;
     320    rtems_sector_data_t *sector = NULL;
    321321    rtems_part_desc_t   *part_desc;
    322322    uint8_t             *data;
     
    328328    if (rc != RTEMS_SUCCESSFUL)
    329329    {
     330        if (sector)
     331            free(sector);
    330332        return rc;
    331333    }
Note: See TracChangeset for help on using the changeset viewer.