summaryrefslogtreecommitdiffstats
path: root/mtdutils
diff options
context:
space:
mode:
Diffstat (limited to 'mtdutils')
-rw-r--r--mtdutils/Android.mk2
-rw-r--r--mtdutils/mtdutils.c2
2 files changed, 1 insertions, 3 deletions
diff --git a/mtdutils/Android.mk b/mtdutils/Android.mk
index 57ab579b2..416653698 100644
--- a/mtdutils/Android.mk
+++ b/mtdutils/Android.mk
@@ -1,5 +1,4 @@
ifneq ($(TARGET_SIMULATOR),true)
-ifeq ($(TARGET_ARCH),arm)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
@@ -20,5 +19,4 @@ LOCAL_STATIC_LIBRARIES := libmtdutils
LOCAL_SHARED_LIBRARIES := libcutils libc
include $(BUILD_EXECUTABLE)
-endif # TARGET_ARCH == arm
endif # !TARGET_SIMULATOR
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;
}