if (buf->error)
return 0;
ret = para_realloc(buf->data, buf->written);
- buf->data = 0;
- buf->error = 1;
+ free(buf);
return ret;
}
*out_size = membuffer_get_size(buf);
*out_buffer = membuffer_detach(buf);
- membuffer_free(buf);
-
return 1;
}
*out_size = membuffer_get_size(buf);
*out_buffer = membuffer_detach(buf);
- membuffer_free(buf);
return 1;
}
*out_size = membuffer_get_size(buf);
*out_buffer = membuffer_detach(buf);
- membuffer_free(buf);
return 1;
}
free(new_udta_buffer);
*out_size = membuffer_get_size(buf);
- out_buffer = membuffer_detach(buf);
- membuffer_free(buf);
- return out_buffer;
+ return membuffer_detach(buf);
}
udta_offset = get_position(f);
udta_size = read_int32(f);
free(new_meta_buffer);
*out_size = membuffer_get_size(buf);
- out_buffer = membuffer_detach(buf);
- membuffer_free(buf);
- return out_buffer;
+ return membuffer_detach(buf);
}
meta_offset = get_position(f);
meta_size = read_int32(f);