diff options
Diffstat (limited to 'meta/recipes-bsp/grub/files/0036-gfxmenu-gui_list-Remove-code-that-coverity-is-flaggi.patch')
-rw-r--r-- | meta/recipes-bsp/grub/files/0036-gfxmenu-gui_list-Remove-code-that-coverity-is-flaggi.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/0036-gfxmenu-gui_list-Remove-code-that-coverity-is-flaggi.patch b/meta/recipes-bsp/grub/files/0036-gfxmenu-gui_list-Remove-code-that-coverity-is-flaggi.patch new file mode 100644 index 0000000000..61e5e5797d --- /dev/null +++ b/meta/recipes-bsp/grub/files/0036-gfxmenu-gui_list-Remove-code-that-coverity-is-flaggi.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 9433cb3a37c03f22c2fa769121f1f509fd031ae9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Darren Kenny <darren.kenny@oracle.com> | ||
3 | Date: Mon, 7 Dec 2020 14:44:47 +0000 | ||
4 | Subject: [PATCH] gfxmenu/gui_list: Remove code that coverity is flagging as | ||
5 | dead | ||
6 | |||
7 | The test of value for NULL before calling grub_strdup() is not required, | ||
8 | since the if condition prior to this has already tested for value being | ||
9 | NULL and cannot reach this code if it is. | ||
10 | |||
11 | Fixes: CID 73659 | ||
12 | |||
13 | Signed-off-by: Darren Kenny <darren.kenny@oracle.com> | ||
14 | Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> | ||
15 | |||
16 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=4a1aa5917595650efbd46b581368c470ebee42ab] | ||
17 | Signed-off-by: Marta Rybczynska <marta.rybczynska@huawei.com> | ||
18 | --- | ||
19 | grub-core/gfxmenu/gui_list.c | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/grub-core/gfxmenu/gui_list.c b/grub-core/gfxmenu/gui_list.c | ||
23 | index 01477cd..df334a6 100644 | ||
24 | --- a/grub-core/gfxmenu/gui_list.c | ||
25 | +++ b/grub-core/gfxmenu/gui_list.c | ||
26 | @@ -771,7 +771,7 @@ list_set_property (void *vself, const char *name, const char *value) | ||
27 | { | ||
28 | self->need_to_recreate_boxes = 1; | ||
29 | grub_free (self->selected_item_box_pattern); | ||
30 | - self->selected_item_box_pattern = value ? grub_strdup (value) : 0; | ||
31 | + self->selected_item_box_pattern = grub_strdup (value); | ||
32 | self->selected_item_box_pattern_inherit = 0; | ||
33 | } | ||
34 | } | ||