Commit d133036
drm/nouveau/gsp: fix potential leak of memory used during acpi init
If any of the ACPI calls fail, memory allocated for the input buffer
would be leaked. Fix failure paths to free allocated memory.
Also add checks to ensure the allocations succeeded in the first place.
Reported-by: Danilo Krummrich <dakr@kernel.org>
Fixes: 176fdcb ("drm/nouveau/gsp/r535: add support for booting GSP-RM")
Signed-off-by: Ben Skeggs <bskeggs@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250617040036.2932-1-bskeggs@nvidia.com1 parent 3d44147 commit d133036
1 file changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
722 | | - | |
723 | 722 | | |
724 | 723 | | |
725 | 724 | | |
726 | 725 | | |
727 | 726 | | |
728 | 727 | | |
729 | 728 | | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
730 | 733 | | |
731 | 734 | | |
732 | | - | |
| 735 | + | |
733 | 736 | | |
734 | 737 | | |
735 | 738 | | |
736 | | - | |
| 739 | + | |
737 | 740 | | |
738 | 741 | | |
739 | 742 | | |
740 | 743 | | |
| 744 | + | |
741 | 745 | | |
742 | 746 | | |
743 | 747 | | |
| |||
754 | 758 | | |
755 | 759 | | |
756 | 760 | | |
757 | | - | |
758 | 761 | | |
759 | 762 | | |
760 | 763 | | |
761 | 764 | | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
762 | 769 | | |
763 | 770 | | |
764 | | - | |
| 771 | + | |
765 | 772 | | |
766 | 773 | | |
767 | 774 | | |
768 | | - | |
| 775 | + | |
769 | 776 | | |
770 | 777 | | |
771 | 778 | | |
772 | 779 | | |
773 | 780 | | |
774 | 781 | | |
| 782 | + | |
775 | 783 | | |
776 | 784 | | |
777 | 785 | | |
| |||
0 commit comments