bluez5: fix minor error handling/warning issues

This commit is contained in:
Pauli Virtanen 2022-07-06 13:38:06 +03:00 committed by Wim Taymans
parent 84d2b2ce3a
commit 783fbc507b
3 changed files with 14 additions and 8 deletions

View file

@ -415,7 +415,7 @@ static void *codec_init(const struct a2dp_codec *codec, uint32_t flags,
return this;
error:
if (this->aacenc)
if (this && this->aacenc)
aacEncClose(&this->aacenc);
free(this);
errno = -res;