]> git.dujemihanovic.xyz Git - u-boot.git/commit
cmd: ubi: check 'updating' before calling ubi_more_update_data()
authorMartin Kurbanov <mmkurbanov@salutedevices.com>
Sun, 16 Jun 2024 13:34:18 +0000 (16:34 +0300)
committerHeiko Schocher <hs@denx.de>
Wed, 3 Jul 2024 06:05:19 +0000 (08:05 +0200)
commit27b169f9d0bed978bea1d86ab8d584da6ada54d0
tree1a01a61defd74c3f566897dc54d6bd5c1afdeed1
parentabae0b76f98647243d75770cdca5c1ad3302d5e8
cmd: ubi: check 'updating' before calling ubi_more_update_data()

If 0 is passed to the 'bytes' parameter in the ubi_start_update(),
there is no need to call the ubi_more_update_data(). Otherwise,
there will be a double-free of 'vol->upd_buf'.

Also check that the ubi_start_update() was called before calling
the ubi_more_update_data().

Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
cmd/ubi.c