mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
ndb - NdbDictionaryImpl.cpp: fix access to freed memory
This commit is contained in:
parent
99f9ff6755
commit
cfb1b90005
1 changed files with 11 additions and 1 deletions
|
@ -2049,12 +2049,22 @@ NdbDictionaryImpl::getIndexImpl(const char * externalName,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* internalName may be pointer to m_ndb.theImpl->m_internalname.c_str()
|
||||
* and may get deallocated in next call.
|
||||
*
|
||||
* Passing around pointers to volatile internal members may not be
|
||||
* optimal. Suggest use BaseString instances passed by value.
|
||||
*/
|
||||
|
||||
BaseString save_me(internalName);
|
||||
NdbTableImpl* prim = getTable(tab->m_primaryTable.c_str());
|
||||
if(prim == 0){
|
||||
m_error.code = 4243;
|
||||
return 0;
|
||||
}
|
||||
|
||||
internalName = save_me.c_str();
|
||||
|
||||
/**
|
||||
* Create index impl
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue