Thank you Noriko and Simon for your careful reviews.
I modified the fix:
* create the subentry with 'cn' value 'repl keep alive <rid>'
* slapi_ch_free without cast
* do the keep alive entry with '(&(objectclass=ldapsubentry)(cn=%s
%d))', in previous fix I forgot '%d'
I modified the test case following the recommended modifications