am 8d58c957
: Merge "Free allocated struct after freeing field"
* commit '8d58c957036835db148acc4e506633a016dc6c7e': Free allocated struct after freeing field
This commit is contained in:
commit
da993fcf26
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user