On Sun, 14 Apr 2002 22:39:32 +0200
"Karel Zak" <zakkr@zf.jcu.cz> wrote:
> - PREPARE_KEY_PREFIX_SIZE is 4 not 3
>
> - in the PrepareKey() is needful fix:
>
>
> + if (store == PREPARE_STORE_SHARE) { /* shared between same DB */
> + *flag |= QCF_SHARE_NOTREMOVEABLE;
> + key = (char *) palloc(strlen(name) + PREPARE_KEY_PREFIX_SIZE
> + + strlen(DatabaseName) +1);
> ^^^^^^^
> must be 3
>
> + sprintf(key, "%s_%s_", DatabaseName, PREPARE_KEY_PREFIX);
> ^^^^^^
> the space for '_' is not allocated :-(
>
> It's my bug probably, I good knew why we need leak detection :-)
Thanks Karel! I made the changes you suggest and the warning (and
the accompanying memory leak) have gone away.
Cheers,
Neil
--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC