If there were errors then temporary buffers were not being freed properly.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
result = yaffs_rd_chunk_tags_nand(dev, in->hdr_chunk, buf, &tags);
- if (result == YAFFS_FAIL)
+ if (result == YAFFS_FAIL) {
+ yaffs_release_temp_buffer(dev, buf);
return;
+ }
oh = (struct yaffs_obj_hdr *)buf;
bi->has_shrink_hdr = 1;
}
-
return new_chunk_id;
}
BUG();
- if (retval == YAFFS_FAIL)
+ if (retval == YAFFS_FAIL) {
+ if (local_data)
+ yaffs_release_temp_buffer(dev, data);
+
return YAFFS_FAIL;
+ }
if (dev->param.inband_tags) {
if (tags) {