diff --git a/maestro/pool_manager_registry.c b/maestro/pool_manager_registry.c
index 96eaecd54a17a84558f9897cb97cfe574ef669be..18e2ceddc0c33770eaeecdeaa97b68dc26ad4321 100644
--- a/maestro/pool_manager_registry.c
+++ b/maestro/pool_manager_registry.c
@@ -259,11 +259,17 @@ mstro_pc_app_register_pending(mstro_app_id id)
         if((elt!=NULL) && (elt->pending)) {
           //FIXME should be a warning as we can handle this 
           ERR("There is alreading a pending entry for app %"PRIappid", should not overwrite \n", id);
+          /*cleanup*/
+          status = mstro_pm_app_reg__entry_dispose(e);
+          assert(status ==MSTRO_OK);
           return MSTRO_FAIL;
         }
         else if((elt!=NULL) && (!elt->pending))
         {
           ERR("App %"PRIappid" already exists in regsitry, should not overwrite \n", id);
+          /*cleanup*/
+          status = mstro_pm_app_reg__entry_dispose(e);
+          assert(status ==MSTRO_OK);
           return MSTRO_FAIL;
         }
         else { // elt == NULL