Fix deallocation of uninitialized pointer
When pCreateInfo->setLayoutCount is 0, descriptorSets[0].bindings would
not be assigned the initial bindingStorage value, which is the start of
the additional memory that is allocated for the PipelineLayout object.
It is used in PipelineLayout::destroy() for deallocating said memory,
which leads to attempting to free an initialized pointer.
This was a regression caused by https://swiftshader-review.googlesource.com/c/SwiftShader/+/44328
Bug: b/154522740
Change-Id: I98f63d58e9d64b36f15d966afd1bc70c1ec97f59
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/45448
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Tested-by:
Nicolas Capens <nicolascapens@google.com>
Reviewed-by:
Alexis Hétu <sugoi@google.com>
Reviewed-by:
Trevor Black <vantablack@google.com>
Showing
Please
register
or
sign in
to comment