Skip to content

Commit ee7148a

Browse files
committed
Fix memory leak when parsing MS countersig
1 parent 66e77c9 commit ee7148a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/countersignature.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,9 @@ CountersignatureImpl* ms_countersig_impl_new(const uint8_t* data, long size)
457457
result->funcs = &FUNC_ARRAY_NAME_FOR_IMPL(pkcs7);
458458
result->pkcs7 = p7;
459459
return result;
460+
} else if (p7) {
461+
PKCS7_free(p7);
462+
return NULL;
460463
}
461464

462465
d = data;

0 commit comments

Comments
 (0)