Fix valgrind issues found running unit tests

* GLContextTLSData default constructor should be initialised.
* Add some missing deletes in shader reflection
* Call freeaddrinfo after getaddrinfo
* Don't leak if we're reserving 0 bytes in rdcstr over the top of an already
  empty rdcstr
This commit is contained in:
baldurk
2019-02-19 13:53:56 +00:00
parent cb26815570
commit b14e3f2ef9
7 changed files with 36 additions and 6 deletions
+1 -1
View File
@@ -327,7 +327,7 @@ public:
{
// if we're empty then normally reserving s==0 would do nothing, but if we need to append a null
// terminator then we do actually need to allocate
if(s == 0 && capacity() == 0 && null_terminator<T>::allocCount(0) > 0)
if(s == 0 && capacity() == 0 && elems == NULL && null_terminator<T>::allocCount(0) > 0)
{
elems = allocate(null_terminator<T>::allocCount(0));
return;