Commit fbd0fb2
BUG/MINOR: halog: Add OOM checks for calloc() in filter_count_srv_status() and filter_count_url()
This patch adds missing out-of-memory (OOM) checks after calls to
calloc() in the functions `filter_count_srv_status()` and `filter_count_url()`.
If memory allocation fails, an error message is printed to stderr
and the process exits with status 1. This improves robustness
and prevents undefined behavior in low-memory situations.
Co-authored-by: Christian Norbert Menges <christian.norbert.menges@sap.com>1 parent 8c555a4 commit fbd0fb2
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1571 | 1571 | | |
1572 | 1572 | | |
1573 | 1573 | | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
1574 | 1578 | | |
1575 | 1579 | | |
1576 | 1580 | | |
| |||
1680 | 1684 | | |
1681 | 1685 | | |
1682 | 1686 | | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
1683 | 1691 | | |
1684 | 1692 | | |
1685 | 1693 | | |
| |||
0 commit comments