]> git.ozlabs.org Git - petitboot/commitdiff
Fix pb-discover segfaults caused by list corruption.
authorBrandon Bergren <git@bdragon.rtk0.net>
Sun, 10 Jun 2018 18:21:58 +0000 (13:21 -0500)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 12 Jun 2018 00:56:35 +0000 (10:56 +1000)
I was seeing list corruption and segfaults in pb-discover on my Talos
II when using both yaboot and kboot config files on the same device.

My assumption is that discover_context_add_boot_option() was being
called on the same pointer more than once.

So, null the pointer right after the call. The ownership was transferred
anyway so the parsers should not keep it around.

Signed-off-by: Brandon Bergren <git@bdragon.rtk0.net>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>

No differences found