Changeset 121dd881 in rtems


Ignore:
Timestamp:
Sep 5, 2013, 5:22:49 PM (6 years ago)
Author:
Gedare Bloom <gedare@…>
Branches:
4.11, master
Children:
c963ac7
Parents:
a8007dc2
Message:

bdpart: Argument cannot be negative

If open(fd) fails then avoid the error path that calls close(fd).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libblock/src/bdpart-read.c

    ra8007dc2 r121dd881  
    7575  rtems_status_code sc = RTEMS_SUCCESSFUL;
    7676  int rv = 0;
    77   int fd = -1;
     77  int fd;
    7878  rtems_disk_device *dd = NULL;
    7979  rtems_blkdev_bnum disk_begin = 0;
     
    8484  if (fd < 0) {
    8585    sc = RTEMS_INVALID_NAME;
    86     goto error;
     86    goto out;
    8787  }
    8888
     
    120120  }
    121121
     122out:
    122123  return sc;
    123124}
Note: See TracChangeset for help on using the changeset viewer.