diff options
Diffstat (limited to 'src/analysis/project.c')
-rw-r--r-- | src/analysis/project.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/analysis/project.c b/src/analysis/project.c index 71e0f43..13985f3 100644 --- a/src/analysis/project.c +++ b/src/analysis/project.c @@ -388,7 +388,7 @@ bool g_study_project_save(GStudyProject *project, const char *filename) const gchar *hash; /* Empreinte d'un contenu */ char *access; /* Chemin pour une sous-config.*/ xmlXPathObjectPtr xobject; /* Cible d'une recherche */ - const char *format; /* Format associé à un élément */ + char *format; /* Format associé à un élément */ /* Forme générale */ @@ -470,6 +470,7 @@ bool g_study_project_save(GStudyProject *project, const char *filename) { format = g_loaded_content_get_format_name(project->contents[i]); result = add_string_attribute_to_node(xdoc, context, access, "format", format); + free(format); } if (result) @@ -597,7 +598,7 @@ void g_study_project_discover_binary_content(GStudyProject *project, GBinContent void on_loaded_content_analyzed(GLoadedContent *content, gboolean success, GStudyProject *project) { - const char *desc; /* Description du contenu */ + char *desc; /* Description du contenu */ desc = g_loaded_content_describe(content, true); @@ -610,6 +611,8 @@ void on_loaded_content_analyzed(GLoadedContent *content, gboolean success, GStud else log_variadic_message(LMT_ERROR, _("Failed to load '%s'"), desc); + free(desc); + /** * Le contenu a normalement été sur-référencé pour ne pas disparaître * en cours d'analyse. @@ -1291,7 +1294,7 @@ static void on_new_content_resolved(GContentResolver *resolver, wgroup_id_t wid, size_t i; /* Boucle de parcours */ GBinContent *content; /* Contenu brut à manipuler */ const gchar *hash; /* Empreinte d'un contenu */ - const char *format; /* Format associé à un élément */ + char *format; /* Format associé à un élément */ char *access; /* Chemin pour une sous-config.*/ xmlXPathObjectPtr xobject; /* Cible d'une recherche */ bool status; /* Bilan d'une restauration */ @@ -1316,6 +1319,8 @@ static void on_new_content_resolved(GContentResolver *resolver, wgroup_id_t wid, asprintf(&access, "/ChrysalideProject/LoadedContents/Content[@hash='%s' and @format='%s']", hash, format); + free(format); + xobject = get_node_xpath_object(handler->context, access); if (XPATH_OBJ_NODES_COUNT(xobject) > 0) |