aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-09-09 13:48:38 +0300
committerVadim Yanitskiy <axilirator@gmail.com>2017-09-09 13:48:38 +0300
commit7f1aa98a8f2da8dbe13507f763274b41824e477d (patch)
treee70cd4305dbd92501aec55511191ee6fba8add11
parent17b5ba93109743664d17df7bd89e1f44544b3fa3 (diff)
libosmogapk: fix memory leak in both AMR and EFR codecs
The memory, allocated by codec_efr_init() / codec_amr_init(), was not cleaned after calling the codec_exit(). Found using talloc memory debugging API.
-rw-r--r--src/codec_amr.c2
-rw-r--r--src/codec_efr.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/codec_amr.c b/src/codec_amr.c
index df35b49..a2787d7 100644
--- a/src/codec_amr.c
+++ b/src/codec_amr.c
@@ -61,6 +61,8 @@ codec_amr_exit(void *state)
Decoder_Interface_exit(st->decoder);
Encoder_Interface_exit(st->encoder);
+ talloc_free(st);
+
return;
}
diff --git a/src/codec_efr.c b/src/codec_efr.c
index 98bfdcd..ddd3790 100644
--- a/src/codec_efr.c
+++ b/src/codec_efr.c
@@ -62,6 +62,8 @@ codec_efr_exit(void *state)
Decoder_Interface_exit(st->decoder);
Encoder_Interface_exit(st->encoder);
+ talloc_free(st);
+
return;
}