[sword-devel] Minor memory leak in diatheke
Troy A. Griffitts
scribe at crosswire.org
Mon Oct 19 09:34:09 EDT 2020
Hi Jaak,
Thank you. diatheke was initially written and owned by Chris Little, but
he's been gone now for a while. Happy for a new owner if you'd like to
take it up.
On 10/19/20 1:24 PM, Jaak Ristioja wrote:
> 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
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
More information about the sword-devel
mailing list