<div dir="ltr">R-B<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 18, 2016 at 2:37 PM, Mark Janes <span dir="ltr"><<a href="mailto:mark.a.janes@intel.com" target="_blank">mark.a.janes@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Trivial fix to improperly handled cleanup during<br>
VK_ERROR_OUT_OF_HOST_MEMORY.<br>
<br>
Identified by Coverity: CID 1358908 and 1358909<br>
---<br>
src/intel/vulkan/anv_batch_chain.c | 4 ++--<br>
1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c<br>
index 36c9565..a98a0a9 100644<br>
--- a/src/intel/vulkan/anv_batch_chain.c<br>
+++ b/src/intel/vulkan/anv_batch_chain.c<br>
@@ -120,7 +120,7 @@ anv_reloc_list_grow(struct anv_reloc_list *list,<br>
struct anv_bo **new_reloc_bos =<br>
anv_alloc(alloc, new_length * sizeof(*list->reloc_bos), 8,<br>
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);<br>
- if (new_relocs == NULL) {<br>
+ if (new_reloc_bos == NULL) {<br>
anv_free(alloc, new_relocs);<br>
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);<br>
}<br>
@@ -891,7 +891,7 @@ anv_cmd_buffer_add_bo(struct anv_cmd_buffer *cmd_buffer,<br>
struct anv_bo **new_bos =<br>
anv_alloc(&cmd_buffer->pool->alloc, new_len * sizeof(*new_bos),<br>
8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);<br>
- if (new_objects == NULL) {<br>
+ if (new_bos == NULL) {<br>
anv_free(&cmd_buffer->pool->alloc, new_objects);<br>
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);<br>
}<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.8.1<br>
<br>
</font></span></blockquote></div><br></div>