Fix two more clang static analysis warnings

This commit is contained in:
Robin Gareus
2020-01-27 17:42:28 +01:00
parent f9cc630b10
commit f101a657f2
2 changed files with 2 additions and 0 deletions

View File

@@ -70,6 +70,7 @@ MidiBuffer::resize (size_t size)
cache_aligned_malloc ((void**) &_data, size);
if (_size) {
assert (old_data);
memcpy (_data, old_data, _size);
}

View File

@@ -71,6 +71,7 @@ RTMidiBuffer::resize (size_t size)
cache_aligned_malloc ((void**) &_data, size * sizeof (Item));
if (_size) {
assert (old_data);
memcpy (_data, old_data, _size * sizeof (Item));
cache_aligned_free (old_data);
}