fix memoryleak sqlite