[mod_imagick] Coverity CID 1500258 (Resource leak)

This commit is contained in:
Jakub Karolczyk 2023-04-06 12:25:48 +01:00
parent 73ea37c5ab
commit 0e9954467f
1 changed files with 3 additions and 0 deletions

View File

@ -384,6 +384,7 @@ static switch_status_t read_page(pdf_file_context_t *context)
if (ret == MagickFalse && context->exception->severity != UndefinedException) {
CatchException(context->exception);
free(storage);
return SWITCH_STATUS_FALSE;
}
@ -397,6 +398,8 @@ static switch_status_t read_page(pdf_file_context_t *context)
if (ret == MagickFalse && context->exception->severity != UndefinedException) {
CatchException(context->exception);
switch_img_free(&img);
return SWITCH_STATUS_FALSE;
}