Fixed an issue where an unresetted geterror in combination with a null connection causes

to many log messages.
This commit is contained in:
2016-11-07 09:48:47 +01:00
parent fd5451e8fd
commit d0fe079b71

View File

@ -768,7 +768,9 @@ static hdbCallbackReturn SctMainCallback(Hdb * node, void *userData,
geterror = GetHdbProp(node, "geterror"); geterror = GetHdbProp(node, "geterror");
if (geterror != NULL) { if (geterror != NULL) {
snprintf(error,255,"ERROR: %s", geterror); snprintf(error,255,"ERROR: %s", geterror);
if(con != NULL){
SCWrite(con, error, eError); SCWrite(con, error, eError);
}
if (mm->v->dataType == HIPTEXT) { if (mm->v->dataType == HIPTEXT) {
if (mm->v->v.text != NULL) { if (mm->v->v.text != NULL) {
free(mm->v->v.text); free(mm->v->v.text);