mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <dev@lynxeye.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/5] fs: efi: avoid comparison with uninitialized variable
Date: Wed,  2 Mar 2016 21:50:35 +0100	[thread overview]
Message-ID: <1456951837-20843-3-git-send-email-dev@lynxeye.de> (raw)
In-Reply-To: <1456951837-20843-1-git-send-email-dev@lynxeye.de>

volume will only be initialized when efi_loaded_image is
set.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 fs/efi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/efi.c b/fs/efi.c
index a7adcb9..0f74cda 100644
--- a/fs/efi.c
+++ b/fs/efi.c
@@ -527,7 +527,7 @@ int efi_fs_probe(struct efi_device *efidev)
 		BS->handle_protocol(efi_loaded_image->device_handle,
 				&efi_simple_file_system_protocol_guid, (void*)&volume);
 
-	if (efidev->protocol == volume)
+	if (efi_loaded_image && efidev->protocol == volume)
 		path = xstrdup("/boot");
 	else
 		path = asprintf("/efi%d", index);
-- 
2.5.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2016-03-02 20:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02 20:50 [PATCH 1/5] efi: fix memory leak in error path Lucas Stach
2016-03-02 20:50 ` [PATCH 2/5] net: efi: correct function signature of set_ethaddr Lucas Stach
2016-03-02 20:50 ` Lucas Stach [this message]
2016-03-02 20:50 ` [PATCH 4/5] bbu: use correct printf format specifier for size_t Lucas Stach
2016-03-02 20:50 ` [PATCH 5/5] ratp: use proper defines for BAREBOX_CMD Lucas Stach
2016-03-04  6:55 ` [PATCH 1/5] efi: fix memory leak in error path Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456951837-20843-3-git-send-email-dev@lynxeye.de \
    --to=dev@lynxeye.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox