Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a8c06b63
Commit
a8c06b63
authored
Mar 29, 2018
by
Józef Kucia
Committed by
Alexandre Julliard
Mar 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Avoid goto in wine_vk_instance_load_physical_devices().
Signed-off-by:
Józef Kucia
<
jkucia@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
46bc42e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
vulkan.c
dlls/winevulkan/vulkan.c
+9
-10
No files found.
dlls/winevulkan/vulkan.c
View file @
a8c06b63
...
...
@@ -341,7 +341,7 @@ static void wine_vk_instance_convert_create_info(const VkInstanceCreateInfo *src
static
VkResult
wine_vk_instance_load_physical_devices
(
struct
VkInstance_T
*
instance
)
{
VkResult
res
;
struct
VkPhysicalDevice_T
**
tmp_phys_devs
=
NULL
;
struct
VkPhysicalDevice_T
**
tmp_phys_devs
;
uint32_t
num_phys_devs
=
0
;
unsigned
int
i
;
...
...
@@ -362,13 +362,16 @@ static VkResult wine_vk_instance_load_physical_devices(struct VkInstance_T *inst
res
=
instance
->
funcs
.
p_vkEnumeratePhysicalDevices
(
instance
->
instance
,
&
num_phys_devs
,
tmp_phys_devs
);
if
(
res
!=
VK_SUCCESS
)
goto
err
;
{
heap_free
(
tmp_phys_devs
);
return
res
;
}
instance
->
phys_devs
=
heap_calloc
(
num_phys_devs
,
sizeof
(
*
instance
->
phys_devs
));
if
(
!
instance
->
phys_devs
)
{
res
=
VK_ERROR_OUT_OF_HOST_MEMORY
;
goto
err
;
heap_free
(
tmp_phys_devs
)
;
return
VK_ERROR_OUT_OF_HOST_MEMORY
;
}
/* Wrap each native physical device handle into a dispatchable object for the ICD loader. */
...
...
@@ -378,8 +381,8 @@ static VkResult wine_vk_instance_load_physical_devices(struct VkInstance_T *inst
if
(
!
phys_dev
)
{
ERR
(
"Unable to allocate memory for physical device!
\n
"
);
res
=
VK_ERROR_OUT_OF_HOST_MEMORY
;
goto
err
;
heap_free
(
tmp_phys_devs
)
;
return
VK_ERROR_OUT_OF_HOST_MEMORY
;
}
instance
->
phys_devs
[
i
]
=
phys_dev
;
...
...
@@ -389,10 +392,6 @@ static VkResult wine_vk_instance_load_physical_devices(struct VkInstance_T *inst
heap_free
(
tmp_phys_devs
);
return
VK_SUCCESS
;
err:
heap_free
(
tmp_phys_devs
);
return
res
;
}
/* Helper function used for freeing an instance structure. This function supports full
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment