summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <benjaminfranzke@googlemail.com>2010-07-13 10:39:49 +0200
committerben <benjaminfranzke@googlemail.com>2010-07-13 10:39:49 +0200
commitb071118b59b117652d7a45c4104a78d65995329e (patch)
tree597e9ae6719c53e1c3dd36f08e3a19e347a0922c
parentf2b8a7000aef9b7eecc0396d9bbe0ccfee9b8100 (diff)
downloadpa-sink-ctl-b071118b59b117652d7a45c4104a78d65995329e.tar.gz
pa-sink-ctl-b071118b59b117652d7a45c4104a78d65995329e.tar.bz2
pa-sink-ctl-b071118b59b117652d7a45c4104a78d65995329e.zip
sink_input_list_clear: fix null pointer free
-rw-r--r--src/sink_input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sink_input.c b/src/sink_input.c
index 9a72899..5679813 100644
--- a/src/sink_input.c
+++ b/src/sink_input.c
@@ -49,7 +49,8 @@ void sink_input_list_enlarge(sink_input_info*** sink_input_list, int* max, int c
void sink_input_list_clear(sink_input_info** sink_input_list, int *max) {
for (int i = 0; i < (*max); ++i)
- sink_input_clear(sink_input_list[i]);
+ if (sink_input_list[i] != NULL)
+ sink_input_clear(sink_input_list[i]);
(*max) = 0;