]> git.ipfire.org Git - thirdparty/plymouth.git/commit
command-parser: Don't add duplicate command to command list
authorRay Strode <rstrode@redhat.com>
Tue, 12 Apr 2022 20:16:49 +0000 (16:16 -0400)
committerRay Strode <rstrode@redhat.com>
Tue, 12 Apr 2022 20:20:20 +0000 (16:20 -0400)
commita1996600ebb85f98c297fa47122b99fbdf49c6ea
tree71dacd23f4631005143e2fcc571f3a4b7426e622
parentac631853a8f63252492f6443867c505083b327b5
command-parser: Don't add duplicate command to command list

ply_command_parser_get_options inexplicably adds a duplicate
command to the list of available subcommands every time it's
called. This must be some sort of cut and paste bug, it shouldn't
be modifying the list.

That leads to double frees when freeing the command parser.

This commit fixes that.

Related: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/175
src/libply/ply-command-parser.c