fix a very rare case of use of uninitialized value combined with a
memleak