Commit 75240f6
committed
jsonapi: fix memory leakage during OOM error recovery.
Coverity pointed out that inc_lex_level() would leak memory
(not to mention corrupt the pstack data structure) if some
but not all of its three REALLOC's failed. To fix, store
successfully-updated pointers back into the pstack struct
immediately.
Oversight in 0785d1b, so no need for back-patch.1 parent a7e5237 commit 75240f6
1 file changed
+14
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
547 | 553 | | |
548 | 554 | | |
549 | | - | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
550 | 560 | | |
| 561 | + | |
551 | 562 | | |
552 | | - | |
| 563 | + | |
553 | 564 | | |
554 | 565 | | |
| 566 | + | |
555 | 567 | | |
556 | 568 | | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | 569 | | |
561 | 570 | | |
562 | 571 | | |
| |||
0 commit comments