Fix interp::m_name resource leak found by Coverity
authorGary Benson <gbenson@redhat.com>
Thu, 11 Oct 2018 09:19:26 +0000 (10:19 +0100)
committerGary Benson <gbenson@redhat.com>
Thu, 11 Oct 2018 09:19:26 +0000 (10:19 +0100)
commitfbe61a3661b083a666e6550b3b0c2de364e6d4a6
tree081ad1be61ca54cdef6de1de3641afb91062c86a
parenta9597defaf39e2277c4c5ff510e708f226f54fbc
Fix interp::m_name resource leak found by Coverity

This commit fixes a resource leak found by Coverity, where interp's
constructor allocated memory for m_name that interp's destructor did
not free.

gdb/ChangeLog:

* interps.h (interp::m_name): Make private and mutable.
* interps.c (interp::~interp): Free m_name.
gdb/ChangeLog
gdb/interps.c
gdb/interps.h