Changeset 2477a39 in rtems


Ignore:
Timestamp:
Sep 13, 2013, 11:14:35 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
f82851c5
Parents:
d2da61a
git-author:
Sebastian Huber <sebastian.huber@…> (09/13/13 11:14:35)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/13/13 14:47:55)
Message:

fstests/fspermission: Fix resource leak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/fstests/fspermission/test.c

    rd2da61a r2477a39  
    204204   */
    205205  fd=creat(file01,mode);
     206  rtems_test_assert(fd >= 0);
    206207  status=close(fd);
    207208  rtems_test_assert(status==0);
     
    211212
    212213  fd=creat(file02,0240);
     214  rtems_test_assert(fd >= 0);
    213215  status=close(fd);
    214216  rtems_test_assert(status==0);
     
    241243  rtems_test_assert(status==0);
    242244  sprintf(path,"%s/%s",directory01,file01);
    243   fd=creat(path,0777);
     245  fd = creat(path,0777);
     246  rtems_test_assert(fd >= 0);
     247  status = close(fd);
     248  rtems_test_assert(status == 0);
    244249
    245250  status=chmod(directory01,0340);
     
    261266   */
    262267  fd=open(file01,O_WRONLY);
     268  rtems_test_assert(fd >= 0);
    263269  n=write(fd,test_data,len);
    264270  rtems_test_assert(n==len);
     
    277283  data_buf=(char*)malloc(len+1);
    278284  fd=open(file01,O_RDWR);
    279   rtems_test_assert(fd!=-1);
     285  rtems_test_assert(fd >= 0);
    280286  n=read(fd,data_buf,len);
    281287  rtems_test_assert(n==len);
     
    314320
    315321  fd=open(file01,O_WRONLY);
     322  rtems_test_assert(fd >= 0);
    316323  n=write(fd,test_data,len);
    317324  rtems_test_assert(n==len);
Note: See TracChangeset for help on using the changeset viewer.