Commit 3219122
committed
pstore/ram: Consolidate kfree() paths
There's no reason to keep separate kfree() paths: either all allocations
succeeded, or not. Everything is torn down in the case of failure, so
adjust the callers to reflect this.
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-and-tested-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Link: https://lore.kernel.org/r/20221011200112.731334-2-keescook@chromium.org1 parent 893c5f1 commit 3219122
1 file changed
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
454 | 460 | | |
455 | 461 | | |
456 | 462 | | |
| |||
772 | 778 | | |
773 | 779 | | |
774 | 780 | | |
775 | | - | |
| 781 | + | |
776 | 782 | | |
777 | 783 | | |
778 | 784 | | |
779 | 785 | | |
780 | | - | |
| 786 | + | |
781 | 787 | | |
782 | 788 | | |
783 | 789 | | |
| |||
788 | 794 | | |
789 | 795 | | |
790 | 796 | | |
791 | | - | |
| 797 | + | |
792 | 798 | | |
793 | 799 | | |
794 | 800 | | |
795 | 801 | | |
796 | | - | |
| 802 | + | |
797 | 803 | | |
798 | 804 | | |
799 | 805 | | |
| |||
857 | 863 | | |
858 | 864 | | |
859 | 865 | | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | | - | |
864 | | - | |
| 866 | + | |
865 | 867 | | |
866 | 868 | | |
867 | 869 | | |
| |||
876 | 878 | | |
877 | 879 | | |
878 | 880 | | |
879 | | - | |
880 | | - | |
881 | 881 | | |
882 | 882 | | |
883 | 883 | | |
| |||
0 commit comments