mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/5] efi: fix memory leak in error path
@ 2016-03-02 20:50 Lucas Stach
  2016-03-02 20:50 ` [PATCH 2/5] net: efi: correct function signature of set_ethaddr Lucas Stach
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Lucas Stach @ 2016-03-02 20:50 UTC (permalink / raw)
  To: barebox

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 arch/efi/efi/efi-device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/efi/efi/efi-device.c b/arch/efi/efi/efi-device.c
index 7db8e48..678a283 100644
--- a/arch/efi/efi/efi-device.c
+++ b/arch/efi/efi/efi-device.c
@@ -168,8 +168,10 @@ static struct efi_device *efi_add_device(efi_handle_t *handle, efi_guid_t **guid
 
 	efiret = BS->open_protocol(handle, &efi_device_path_protocol_guid,
 			&devpath, NULL, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
-	if (EFI_ERROR(efiret))
+	if (EFI_ERROR(efiret)) {
+		free(guidarr);
 		return ERR_PTR(-EINVAL);
+	}
 
 	efidev = xzalloc(sizeof(*efidev));
 
-- 
2.5.0


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-03-04  6:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 3/5] fs: efi: avoid comparison with uninitialized variable Lucas Stach
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox