[sword-devel] Minor memory leak in diatheke
Jaak Ristioja
jaak at ristioja.ee
Mon Oct 19 07:24:16 EDT 2020
Hello!
There is a minor memory leak in utilities/diatheke/diatheke.cpp related
to the following allocation when parsing the query key (-k option):
ref = new char[key.length() + 1];
strcpy (ref, key.c_str());
if (strlen(ref))
runquery |= RQ_REF;
}
The memory allocated is not freed when returning from the function nor
before overwriting its address in the ref variable in cases the user
passes multiple -k options for some strange reason.
Best regards,
J
More information about the sword-devel
mailing list