Commit 369a9c0
firmware_loader: Fix possible resource leak in fw_log_firmware_info()
The alg instance should be released under the exception path, otherwise
there may be resource leak here.
To mitigate this, free the alg instance with crypto_free_shash when kmalloc
fails.
Fixes: 02fe26f ("firmware_loader: Add debug message with checksum for FW file")
Signed-off-by: Gaosheng Cui <[email protected]>
Reviewed-by: Amadeusz Sławiński <[email protected]>
Reviewed-by: Russ Weight <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent f841224 commit 369a9c0
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
832 | | - | |
| 832 | + | |
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
839 | | - | |
840 | | - | |
841 | 839 | | |
842 | 840 | | |
843 | 841 | | |
844 | 842 | | |
| 843 | + | |
845 | 844 | | |
846 | 845 | | |
847 | 846 | | |
| |||
0 commit comments