plug small memory leak. bug 300980 a:don.
git-svn-id: svn://10.0.0.236/trunk@5514 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
858173e862
commit
011bd0d82f
@ -352,7 +352,11 @@ PREF_Init(char *filename)
|
||||
if (!m_HashTable)
|
||||
return 0;
|
||||
|
||||
if (filename) m_filename = strdup(filename);
|
||||
if (filename) {
|
||||
if (m_filename) /* happens if PREF_Init is called twice (it is) */
|
||||
free(m_filename);
|
||||
m_filename = strdup(filename);
|
||||
}
|
||||
|
||||
if (!m_mochaTaskState)
|
||||
m_mochaTaskState = JS_Init((uint32) 0xffffffffL);
|
||||
|
||||
@ -352,7 +352,11 @@ PREF_Init(char *filename)
|
||||
if (!m_HashTable)
|
||||
return 0;
|
||||
|
||||
if (filename) m_filename = strdup(filename);
|
||||
if (filename) {
|
||||
if (m_filename) /* happens if PREF_Init is called twice (it is) */
|
||||
free(m_filename);
|
||||
m_filename = strdup(filename);
|
||||
}
|
||||
|
||||
if (!m_mochaTaskState)
|
||||
m_mochaTaskState = JS_Init((uint32) 0xffffffffL);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user