Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
fb9bd533
Commit
fb9bd533
authored
Jan 18, 2010
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input_stream: added function input_stream_deinit()
All close() implementations must call this method.
parent
a0a26d33
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
2 deletions
+16
-2
bz2_archive_plugin.c
src/archive/bz2_archive_plugin.c
+2
-0
iso9660_archive_plugin.c
src/archive/iso9660_archive_plugin.c
+3
-0
zzip_archive_plugin.c
src/archive/zzip_archive_plugin.c
+1
-0
curl_input_plugin.c
src/input/curl_input_plugin.c
+1
-0
file_input_plugin.c
src/input/file_input_plugin.c
+1
-0
mms_input_plugin.c
src/input/mms_input_plugin.c
+1
-0
rewind_input_plugin.c
src/input/rewind_input_plugin.c
+1
-0
input_stream.c
src/input_stream.c
+0
-2
input_stream.h
src/input_stream.h
+6
-0
No files found.
src/archive/bz2_archive_plugin.c
View file @
fb9bd533
...
...
@@ -182,6 +182,7 @@ bz2_open_stream(struct archive_file *file,
bis
->
base
.
seekable
=
false
;
if
(
!
bz2_alloc
(
bis
,
error_r
))
{
input_stream_deinit
(
&
bis
->
base
);
g_free
(
bis
);
return
NULL
;
}
...
...
@@ -202,6 +203,7 @@ bz2_is_close(struct input_stream *is)
bz2_close
(
&
bis
->
archive
->
base
);
input_stream_deinit
(
&
bis
->
base
);
g_free
(
bis
);
}
...
...
src/archive/iso9660_archive_plugin.c
View file @
fb9bd533
...
...
@@ -212,6 +212,9 @@ iso9660_input_close(struct input_stream *is)
g_free
(
iis
->
statbuf
);
iso9660_archive_close
(
&
iis
->
archive
->
base
);
input_stream_deinit
(
&
iis
->
base
);
g_free
(
iis
);
}
...
...
src/archive/zzip_archive_plugin.c
View file @
fb9bd533
...
...
@@ -171,6 +171,7 @@ zzip_input_close(struct input_stream *is)
zzip_file_close
(
zis
->
file
);
zzip_archive_close
(
&
zis
->
archive
->
base
);
input_stream_deinit
(
&
zis
->
base
);
g_free
(
zis
);
}
...
...
src/input/curl_input_plugin.c
View file @
fb9bd533
...
...
@@ -195,6 +195,7 @@ input_curl_free(struct input_curl *c)
g_queue_free
(
c
->
buffers
);
g_free
(
c
->
url
);
input_stream_deinit
(
&
c
->
base
);
g_free
(
c
);
}
...
...
src/input/file_input_plugin.c
View file @
fb9bd533
...
...
@@ -136,6 +136,7 @@ input_file_close(struct input_stream *is)
struct
file_input_stream
*
fis
=
(
struct
file_input_stream
*
)
is
;
close
(
fis
->
fd
);
input_stream_deinit
(
&
fis
->
base
);
g_free
(
fis
);
}
...
...
src/input/mms_input_plugin.c
View file @
fb9bd533
...
...
@@ -103,6 +103,7 @@ input_mms_close(struct input_stream *is)
struct
input_mms
*
m
=
(
struct
input_mms
*
)
is
;
mmsx_close
(
m
->
mms
);
input_stream_deinit
(
&
m
->
base
);
g_free
(
m
);
}
...
...
src/input/rewind_input_plugin.c
View file @
fb9bd533
...
...
@@ -98,6 +98,7 @@ input_rewind_close(struct input_stream *is)
input_stream_close
(
r
->
input
);
input_stream_deinit
(
&
r
->
base
);
g_free
(
r
);
}
...
...
src/input_stream.c
View file @
fb9bd533
...
...
@@ -99,8 +99,6 @@ input_stream_read(struct input_stream *is, void *ptr, size_t size,
void
input_stream_close
(
struct
input_stream
*
is
)
{
g_free
(
is
->
mime
);
is
->
plugin
->
close
(
is
);
}
...
...
src/input_stream.h
View file @
fb9bd533
...
...
@@ -76,6 +76,12 @@ input_stream_init(struct input_stream *is, const struct input_plugin *plugin)
is
->
mime
=
NULL
;
}
static
inline
void
input_stream_deinit
(
struct
input_stream
*
is
)
{
g_free
(
is
->
mime
);
}
/**
* Opens a new input stream. You may not access it until the "ready"
* flag is set.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment