commit | da993fcf2665102435b05d6b20a4c4e8f8bd3b8f | [log] [tgz] |
---|---|---|
author | Doug Zongker <dougz@android.com> | Fri Jan 21 16:12:03 2011 -0800 |
committer | Android Git Automerger <android-git-automerger@android.com> | Fri Jan 21 16:12:03 2011 -0800 |
tree | 89c3abd929849bf759b60ce0f75e4d91a44df2d8 | |
parent | 8f132ed870b4b83727d59f8019b8fabe49fe8ed4 [diff] | |
parent | 8d58c957036835db148acc4e506633a016dc6c7e [diff] |
am 8d58c957: Merge "Free allocated struct after freeing field" * commit '8d58c957036835db148acc4e506633a016dc6c7e': 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; }