Fix alloc-dealloc mismatch reported by ASan (malloc vs. C++ delete).

Signed-off-by: David Anderson <dave@natulte.net>
Fix alloc-dealloc mismatch reported by ASan (new[] vs. delete).

Signed-off-by: David Anderson <dave@natulte.net>
Fix stack buffer overflow reported by ASan.

Signed-off-by: David Anderson <dave@natulte.net>
Merge pull request #3106 from danderson/asan-fixes

Asan fixes

Reviewed-by: Loic Dachary <ldachary@redhat.com>