- Fix a number of warnings reported by the gcc analyzer.

This commit is contained in:
W.C.A. Wijngaards
2021-06-18 18:12:26 +02:00
parent 02b1a6ae0a
commit 79209823ac
9 changed files with 67 additions and 14 deletions
+10
View File
@@ -561,9 +561,19 @@ void pythonmod_operate(struct module_qstate* qstate, enum module_ev event,
{
/* create qstate */
pq = qstate->minfo[id] = malloc(sizeof(struct pythonmod_qstate));
if(!pq) {
log_err("pythonmod_operate: malloc failure for qstate");
PyGILState_Release(gil);
return;
}
/* Initialize per query data */
pq->data = PyDict_New();
if(!pq->data) {
log_err("pythonmod_operate: malloc failure for query data dict");
PyGILState_Release(gil);
return;
}
}
/* Call operate */