Opened 16 years ago
Closed 14 years ago
#1351 closed defect (fixed)
libmpcodecs/ad_speex.c:44: Memory leak: ctx
Reported by: | Owned by: | reimar | |
---|---|---|---|
Priority: | normal | Component: | ad |
Version: | HEAD | Severity: | normal |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Reproduced by developer: | no | Analyzed by developer: | no |
Description
In file libmpcodecs/ad_speex.c:44
Variable ctx seems to leak memory if 0 is returned:
context_t *ctx = calloc(1, sizeof(context_t));
const SpeexMode *spx_mode;
const SpeexStereoState st_st = SPEEX_STEREO_STATE_INIT; hack
if (!sh->wf sh->wf->cbSize < 80) { mp_msg(MSGT_DECAUDIO, MSGL_FATAL, "Missing extradata!\n");
return 0;
}
This bug was found using cppcheck: http://cppcheck.wiki.sourceforge.net/
Change History (2)
comment:1 by , 14 years ago
Owner: | changed from | to
---|
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
There was a second return 0 that could also cause a leak.
Both should be fixed (r32689).