tools,detect: Don't leak OS when detecting trees
From g_object_get() documentation:
In general, a copy is made of the property contents and the caller is responsible for freeing the memory in the appropriate manner for the type, for instance by calling g_free() or g_object_unref().
Signed-off-by: Fabiano Fidêncio fidencio@redhat.com