We need to free the entry before returning from the function. https://fedorahosted.org/freeipa/ticket/4295