]> git.ozlabs.org Git - petitboot/commit
discover: pxe: Avoid dereferencing null pointer
authorJoel Stanley <joel@jms.id.au>
Tue, 6 Mar 2018 04:02:20 +0000 (14:32 +1030)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Wed, 7 Mar 2018 05:24:31 +0000 (16:24 +1100)
commit47d0601affe80d7f98a2053749f5e1d479f902f4
tree6c464dc65e6284cfbddddad904fddda5ef722f26
parent2c97f136757b5428bb68f91cfa723990dcd985c8
discover: pxe: Avoid dereferencing null pointer

When result is null, we may end up in the error handling path where we
try to dereference null to call cleanup_local. This adds a check for
result.

Found with scan-build.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
[Fixed up commit message typo]
discover/pxe-parser.c