aboutsummaryrefslogtreecommitdiffstats
path: root/src/gfile
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-08-15 02:19:23 +1000
committerinmarket <andrewh@inmarket.com.au>2014-08-15 02:19:23 +1000
commit9b570be049bf656489bdce823f6f04beb80f053d (patch)
treedbe82a8e05aee1a43b2773d3f60a6ecb9855fd37 /src/gfile
parent1105e38414fff26d6b1e278ee3bf19b9b981299c (diff)
downloaduGFX-9b570be049bf656489bdce823f6f04beb80f053d.tar.gz
uGFX-9b570be049bf656489bdce823f6f04beb80f053d.tar.bz2
uGFX-9b570be049bf656489bdce823f6f04beb80f053d.zip
Bug fix. Must close before freeing the structure.
Diffstat (limited to 'src/gfile')
-rw-r--r--src/gfile/inc_fatfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gfile/inc_fatfs.c b/src/gfile/inc_fatfs.c
index b5eee725..2e4ef52b 100644
--- a/src/gfile/inc_fatfs.c
+++ b/src/gfile/inc_fatfs.c
@@ -175,8 +175,8 @@ static bool_t fatfsOpen(GFILE* f, const char* fname)
static void fatfsClose(GFILE* f)
{
if ((FIL*)f->obj != 0) {
- gfxFree( (FIL*)f->obj );
f_close( (FIL*)f->obj );
+ gfxFree( (FIL*)f->obj );
}
}