commit | 8d58c957036835db148acc4e506633a016dc6c7e | [log] [tgz] |
---|---|---|
author | Doug Zongker <dougz@android.com> | Thu Jan 20 07:06:02 2011 -0800 |
committer | Android Code Review <code-review@android.com> | Thu Jan 20 07:06:02 2011 -0800 |
tree | 54152bda82eab71117718b2228d5b027654b5067 | |
parent | c5ebf1fba2f870a4e9453721112900975c18e083 [diff] | |
parent | 862c83bb3121de3e3fd4a9c7ebdb8ae627f8d311 [diff] |
Merge "Free allocated struct after freeing field"
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 @@ 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; }