Commit 398fc32
committed
apr_crypto: fix potential memory leaks of cprng_stream_ctx_t.
This can happen in cprng_stream_ctx_make() on error paths, or at thread exit
with APR_CRYPTO_PRNG_PER_THREAD like the below.
Direct leak of 64 byte(s) in 8 object(s) allocated from:
#0 0x7efd954c7628 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x107628)
#1 0x7efd921db6ca (<unknown module>)
#2 0x7efd952937a2 in apr_crypto_prng_create crypto/apr_crypto_prng.c:367
#3 0x7efd95292c1e in apr_crypto_random_thread_bytes crypto/apr_crypto_prng.c:218
#4 0x5611dbbb9440 in thread_func /home/yle/src/apache/apr/trunk.ro/test/testcrypto.c:2597
#5 0x7efd9537dd86 in dummy_worker threadproc/unix/thread.c:148
#6 0x7efd951efea6 in start_thread nptl/pthread_create.c:477
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893201 13f79535-47bb-0310-9956-ffa450edef681 parent 90a2a77 commit 398fc32
1 file changed
+18
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
1537 | 1538 | | |
1538 | 1539 | | |
1539 | 1540 | | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
1540 | 1551 | | |
1541 | 1552 | | |
1542 | 1553 | | |
| |||
1554 | 1565 | | |
1555 | 1566 | | |
1556 | 1567 | | |
| 1568 | + | |
1557 | 1569 | | |
1558 | 1570 | | |
| 1571 | + | |
1559 | 1572 | | |
1560 | 1573 | | |
1561 | 1574 | | |
| |||
1573 | 1586 | | |
1574 | 1587 | | |
1575 | 1588 | | |
| 1589 | + | |
1576 | 1590 | | |
1577 | 1591 | | |
1578 | 1592 | | |
| |||
1581 | 1595 | | |
1582 | 1596 | | |
1583 | 1597 | | |
| 1598 | + | |
1584 | 1599 | | |
1585 | 1600 | | |
1586 | 1601 | | |
| |||
1589 | 1604 | | |
1590 | 1605 | | |
1591 | 1606 | | |
| 1607 | + | |
1592 | 1608 | | |
1593 | 1609 | | |
1594 | 1610 | | |
1595 | 1611 | | |
| 1612 | + | |
1596 | 1613 | | |
1597 | 1614 | | |
1598 | 1615 | | |
1599 | 1616 | | |
1600 | 1617 | | |
1601 | | - | |
| 1618 | + | |
1602 | 1619 | | |
1603 | 1620 | | |
1604 | 1621 | | |
1605 | 1622 | | |
1606 | 1623 | | |
1607 | 1624 | | |
1608 | | - | |
1609 | | - | |
1610 | | - | |
1611 | | - | |
1612 | | - | |
1613 | 1625 | | |
1614 | 1626 | | |
1615 | 1627 | | |
| |||
0 commit comments