09.06.2012, 14:44
Quote:
|
Thanks for all your feedback. I've recently fixed some of the known bugs (memory leaks as well as mysql_format() crashes while using the '%e' specifier) with the help of CHC and Zeex on IRC. I would like to share the source and get some feedback before I fully release it (to avoid future bugs).
http://www.file-upload.net/download-.../R7-2.rar.html |
I took a look at the new source code, the mysql_function_query was leaking memory as I thought. I forgot to tell about the %e specifier (free) yesterday but it has been fixed that's cool.
But I think that you've forgot to free the memory after triggering errors to OnQueryError
In main.cpp,
Код:
void * ProcessQueryThread(void *lpParam)
{ ...
CMySQLHandler::errorInfo cError;
cError.m_szQuery = cQueue.szQuery;
cError.m_uiErrorID = mysql_errno(SQLHandle[i]->m_stConnectionPtr);
SQLHandle[i]->m_dwError = cError.m_uiErrorID;
cError.m_szCallback = cQueue.szCallback;
cError.m_szError = mysql_error(SQLHandle[i]->m_stConnectionPtr);
SQLHandle[i]->errorCallback.push(cError);
SQLHandle[i]->m_bQueryProcessing = false;
free(cQueue.szQuery);
free(cQueue.szCallback);
free(cQueue.szFormat);
Thanks again for this plugin.


