Merge pull request #2028 from signalwire/coverity_06042023_mod_imagick

[mod_imagick] Coverity CID 1500258 (Resource leak)
This commit is contained in:
Andrey Volk 2023-04-07 00:13:17 +03:00 committed by GitHub
commit 87dea6c503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}