aboutsummaryrefslogtreecommitdiff
path: root/lib/common/data_writer_ostream.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/data_writer_ostream.c')
-rw-r--r--lib/common/data_writer_ostream.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/common/data_writer_ostream.c b/lib/common/data_writer_ostream.c
index 94a04f2..fbd0431 100644
--- a/lib/common/data_writer_ostream.c
+++ b/lib/common/data_writer_ostream.c
@@ -64,7 +64,6 @@ ostream_t *data_writer_ostream_create(const char *filename,
int flags)
{
data_writer_ostream_t *strm = calloc(1, sizeof(*strm));
- sqfs_object_t *obj = (sqfs_object_t *)strm;
ostream_t *base = (ostream_t *)strm;
int ret;
@@ -73,6 +72,8 @@ ostream_t *data_writer_ostream_create(const char *filename,
return NULL;
}
+ sqfs_object_init(strm, stream_destroy, NULL);
+
ret = sqfs_block_processor_begin_file(proc, inode, NULL, flags);
if (ret != 0) {
@@ -86,6 +87,5 @@ ostream_t *data_writer_ostream_create(const char *filename,
base->append = stream_append;
base->flush = stream_flush;
base->get_filename = stream_get_filename;
- obj->destroy = stream_destroy;
return base;
}