History

fate/imf: fix memory leak

Pierre-Anthony Lemieux committed 3 years ago

Commit dbe43bc1 parent a2a0a811 file · +10 −1Browse files

Unified · Split

libavformat/tests/imf.c+10−1
@@ -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;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t