Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F166821774
D13038.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D13038.diff
View Options
Index: head/sys/boot/efi/boot1/boot1.c
===================================================================
--- head/sys/boot/efi/boot1/boot1.c
+++ head/sys/boot/efi/boot1/boot1.c
@@ -460,22 +460,23 @@
imgpath = NULL;
if (status == EFI_SUCCESS) {
text = efi_devpath_name(img->FilePath);
- printf(" Load Path: %S\n", text);
- efi_setenv_freebsd_wcs("Boot1Path", text);
- efi_free_devpath_name(text);
-
- status = BS->HandleProtocol(img->DeviceHandle, &DevicePathGUID,
- (void **)&imgpath);
- if (status != EFI_SUCCESS) {
- DPRINTF("Failed to get image DevicePath (%lu)\n",
- EFI_ERROR_CODE(status));
- } else {
- text = efi_devpath_name(imgpath);
- printf(" Load Device: %S\n", text);
- efi_setenv_freebsd_wcs("Boot1Dev", text);
+ if (text != NULL) {
+ printf(" Load Path: %S\n", text);
+ efi_setenv_freebsd_wcs("Boot1Path", text);
efi_free_devpath_name(text);
- }
+ status = BS->HandleProtocol(img->DeviceHandle,
+ &DevicePathGUID, (void **)&imgpath);
+ if (status != EFI_SUCCESS) {
+ DPRINTF("Failed to get image DevicePath (%lu)\n",
+ EFI_ERROR_CODE(status));
+ } else {
+ text = efi_devpath_name(imgpath);
+ printf(" Load Device: %S\n", text);
+ efi_setenv_freebsd_wcs("Boot1Dev", text);
+ efi_free_devpath_name(text);
+ }
+ }
}
/* Get all the device handles */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 17, 9:05 PM (3 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36871824
Default Alt Text
D13038.diff (1 KB)
Attached To
Mode
D13038: Add check to avoid freeing null pointer in boot1.c
Attached
Detach File
Event Timeline
Log In to Comment