]> Chaos Git - corbenik/ctrulib.git/commitdiff
fix handle leak in sdmc_stat
authorDave Murphy <davem@devkitpro.org>
Sun, 1 Feb 2015 15:19:22 +0000 (15:19 +0000)
committerDave Murphy <davem@devkitpro.org>
Sun, 1 Feb 2015 15:19:22 +0000 (15:19 +0000)
libctru/source/sdmc_dev.c

index d02c96299f2338504c59ac5ee1c113f24ca4422a..b879eb05e4879be07e662feecc1b82d3d74e7170 100644 (file)
@@ -565,6 +565,7 @@ sdmc_stat(struct _reent *r,
       st->st_uid = 1;
       st->st_gid = 2;
       st->st_mode = S_IFDIR | S_IWUSR | S_IWGRP | S_IWOTH | S_IRUSR | S_IRGRP | S_IROTH;
+      FSFILE_Close(fd);
       return 0;
     }