From 3262ef0203e23399f3cab796391da06969c8306b Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Mon, 11 Apr 2016 17:25:42 +0200 Subject: Support adding multiple instances of a decoder srd_inst_new() used the decoder ID as the instance ID, preventing the use of multiple instances of the same decoder in the same session. Simply append a numerical suffix to later instances to allow more. Required changes to cleanup to reliably free all memory. Valgrind checked. This fixes parts of bug #868. Based on original work by: Soeren Apel Signed-off-by: Karl Palsson --- decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'decoder.c') diff --git a/decoder.c b/decoder.c index 8ad0c5a..f15a799 100644 --- a/decoder.c +++ b/decoder.c @@ -849,7 +849,7 @@ SRD_API int srd_decoder_unload(struct srd_decoder *dec) */ for (l = sessions; l; l = l->next) { sess = l->data; - srd_inst_free_all(sess, NULL); + srd_inst_free_all(sess); } /* Remove the PD from the list of loaded decoders. */ -- cgit v1.2.3-70-g09d2