aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2011-01-21 16:12:03 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-01-21 16:12:03 -0800
commitda993fcf2665102435b05d6b20a4c4e8f8bd3b8f (patch)
tree89c3abd929849bf759b60ce0f75e4d91a44df2d8
parent8f132ed870b4b83727d59f8019b8fabe49fe8ed4 (diff)
parent8d58c957036835db148acc4e506633a016dc6c7e (diff)
downloadbootable_recovery-da993fcf2665102435b05d6b20a4c4e8f8bd3b8f.zip
bootable_recovery-da993fcf2665102435b05d6b20a4c4e8f8bd3b8f.tar.gz
bootable_recovery-da993fcf2665102435b05d6b20a4c4e8f8bd3b8f.tar.bz2
am 8d58c957: Merge "Free allocated struct after freeing field"
* commit '8d58c957036835db148acc4e506633a016dc6c7e': Free allocated struct after freeing field
-rw-r--r--mtdutils/mtdutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mtdutils/mtdutils.c b/mtdutils/mtdutils.c
index 198f498..e4d2a60 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;
}