Unified · Split
| @@ -402,6 +402,9 @@ static int test_bad_cpl_parsing(FFIMFCPL **cpl) · 401 unmodified lines | |||
| 402 | return ret; | 402 | return ret; |
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | ff_imf_cpl_free(*cpl); | ||
| 406 | *cpl = NULL; | ||
| 407 | |||
| 405 | return 0; | 408 | return 0; |
| 406 | } | 409 | } |
| 407 | 410 | ||
| @@ -423,6 +426,9 @@ static int test_bad_resource_cpl_parsing(FFIMFCPL **cpl) · 15 unmodified lines | |||
| 423 | return ret; | 426 | return ret; |
| 424 | } | 427 | } |
| 425 | 428 | ||
| 429 | ff_imf_cpl_free(*cpl); | ||
| 430 | *cpl = NULL; | ||
| 431 | |||
| 426 | return 0; | 432 | return 0; |
| 427 | } | 433 | } |
| 428 | 434 | ||
| @@ -594,8 +600,11 @@ int main(int argc, char *argv[]) · 165 unmodified lines | |||
| 594 | printf("#### End failing test ####\n"); | 600 | printf("#### End failing test ####\n"); |
| 595 | 601 | ||
| 596 | printf("#### The following should emit errors ####\n"); | 602 | printf("#### The following should emit errors ####\n"); |
| 597 | if (test_bad_resource_cpl_parsing(&cpl) != 0) | 603 | if (test_bad_resource_cpl_parsing(&cpl) != 0) { |
| 604 | if (cpl) | ||
| 605 | printf("Improper cleanup after failed CPL parsing\n"); | ||
| 598 | ret = 1; | 606 | ret = 1; |
| 607 | } | ||
| 599 | printf("#### End emission of errors ####\n"); | 608 | printf("#### End emission of errors ####\n"); |
| 600 | 609 | ||
| 601 | return ret; | 610 | return ret; |