if (!sumptr) {
putstr("Can't get memory for summary "
"node!\n");
+ free(buf);
+ jffs2_free_cache(part);
return 0;
}
memcpy(sumptr + sumlen - buf_len, buf +
if (buf_size && sumlen > buf_size)
free(sumptr);
- if (ret < 0)
+ if (ret < 0) {
+ free(buf);
+ jffs2_free_cache(part);
return 0;
+ }
if (ret)
continue;
break;
if (insert_node(&pL->frag, (u32) part->offset +
- ofs) == NULL)
+ ofs) == NULL) {
+ free(buf);
+ jffs2_free_cache(part);
return 0;
+ }
if (max_totlen < node->totlen)
max_totlen = node->totlen;
break;
if (! (counterN%100))
puts ("\b\b. ");
if (insert_node(&pL->dir, (u32) part->offset +
- ofs) == NULL)
+ ofs) == NULL) {
+ free(buf);
+ jffs2_free_cache(part);
return 0;
+ }
if (max_totlen < node->totlen)
max_totlen = node->totlen;
counterN++;