mtd: check the return value of malloc and pread
authorQiyuan Zhang <[email protected]>
Mon, 5 Aug 2024 10:47:21 +0000 (06:47 -0400)
committerRobert Marko <[email protected]>
Tue, 31 Dec 2024 16:44:10 +0000 (17:44 +0100)
commitd6459091fd262446fcf98ebe7d33c5615ebf8d41
tree4fff763f47e0c38fc9a94f8e78c4f16ec029cfd9
parentf7ee30120faf6e667570b94d8695487ace5d2caa
mtd: check the return value of malloc and pread

Check the return value of malloc and pread in case they fail.

Signed-off-by: Qiyuan Zhang <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/16070
Signed-off-by: Robert Marko <[email protected]>
package/system/mtd/src/linksys_bootcount.c