Permalink
Browse files

Merge pull request #602 from busstoptaktik/oss-fuzz-3620

Resolve OSS-Fuzz issue 3620

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3620

Credit to OSS-Fuzz
  • Loading branch information...
busstoptaktik committed Oct 12, 2017
2 parents 446ce34 + f6966b8 commit 026294c6f44eb7d4e0bce7b6fa94a0866a5d5769
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/PJ_pipeline.c
View
@@ -269,15 +269,18 @@ static void *destructor (PJ *P, int errlev) {
if (0==P->opaque)
return pj_default_destructor (P, errlev);
for (i = 0; i < P->opaque->steps; i++)
P->opaque->pipeline[i+1]->destructor (P->opaque->pipeline[i+1], errlev);
/* Deallocate each pipeine step, then pipeline array */
if (0!=P->opaque->pipeline)
for (i = 0; i < P->opaque->steps; i++)
if (0!=P->opaque->pipeline[i+1])
P->opaque->pipeline[i+1]->destructor (P->opaque->pipeline[i+1], errlev);
pj_dealloc (P->opaque->pipeline);
pj_dealloc (P->opaque->reverse_step);
pj_dealloc (P->opaque->omit_forward);
pj_dealloc (P->opaque->omit_inverse);
pj_dealloc (P->opaque->argv);
pj_dealloc (P->opaque->current_argv);
pj_dealloc (P->opaque->pipeline);
return pj_default_destructor(P, errlev);
}

0 comments on commit 026294c

Please sign in to comment.