Procházet zdrojové kódy

objdb: destroy all handles in _clear_object

Patch replaces free for object_instance with handle_destroy to remove
leaks in handles (and also memory leak).

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Jan Friesse před 15 roky
rodič
revize
894ece6a14
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      exec/objdb.c

+ 1 - 1
exec/objdb.c

@@ -714,7 +714,7 @@ static int _clear_object(struct object_instance *instance)
 
 
 		list_del(&find_instance->child_list);
 		list_del(&find_instance->child_list);
 		free(find_instance->object_name);
 		free(find_instance->object_name);
-		free(find_instance);
+		hdb_handle_destroy (&object_instance_database, find_instance->object_handle);
 	}
 	}
 
 
 	return 0;
 	return 0;