summaryrefslogtreecommitdiffstats
path: root/mtdutils
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2011-01-20 16:06:02 +0100
committerAndroid Code Review <code-review@android.com>2011-01-20 16:06:02 +0100
commit8d58c957036835db148acc4e506633a016dc6c7e (patch)
tree54152bda82eab71117718b2228d5b027654b5067 /mtdutils
parentam 5d6309e7: fix comparison of ECC stats before and after mtd reads (diff)
parentFree allocated struct after freeing field (diff)
downloadandroid_bootable_recovery-8d58c957036835db148acc4e506633a016dc6c7e.tar
android_bootable_recovery-8d58c957036835db148acc4e506633a016dc6c7e.tar.gz
android_bootable_recovery-8d58c957036835db148acc4e506633a016dc6c7e.tar.bz2
android_bootable_recovery-8d58c957036835db148acc4e506633a016dc6c7e.tar.lz
android_bootable_recovery-8d58c957036835db148acc4e506633a016dc6c7e.tar.xz
android_bootable_recovery-8d58c957036835db148acc4e506633a016dc6c7e.tar.zst
android_bootable_recovery-8d58c957036835db148acc4e506633a016dc6c7e.zip
Diffstat (limited to 'mtdutils')
-rw-r--r--mtdutils/mtdutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mtdutils/mtdutils.c b/mtdutils/mtdutils.c
index 198f4989d..e4d2a6064 100644
--- a/mtdutils/mtdutils.c
+++ b/mtdutils/mtdutils.c
@@ -269,8 +269,8 @@ MtdReadContext *mtd_read_partition(const MtdPartition *partition)
sprintf(mtddevname, "/dev/mtd/mtd%d", partition->device_index);
ctx->fd = open(mtddevname, O_RDONLY);
if (ctx->fd < 0) {
- free(ctx);
free(ctx->buffer);
+ free(ctx);
return NULL;
}