Ticket 47517 - memory leak in range searches and other various leaks
Bug Description: Range searches leak memory
Fix Description: Free the db key, if the key changed between calls to c_get.
Also fixed a leak when doing a delete operation(retrieving the
parent id), and fixed a leak in replication incremental protocol
when getting the hostname control.
https://fedorahosted.org/389/ticket/47517
Reviewed by: nhosoi & richm(Thanks!)