X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Flttv%2Fmodule.c;h=3ebd3a33e6e63f8116be71148858ce3f3896d72a;hb=8b0bbe19ccf2d978bb68b3c78f5d08b0b6899c8d;hp=c4d3d6b07405c037a444cd11058e42cea2de876a;hpb=d8f124de0295aea546b6debf5945bfeea2bbeb2a;p=lttv.git diff --git a/ltt/branches/poly/lttv/lttv/module.c b/ltt/branches/poly/lttv/lttv/module.c index c4d3d6b0..3ebd3a33 100644 --- a/ltt/branches/poly/lttv/lttv/module.c +++ b/ltt/branches/poly/lttv/lttv/module.c @@ -189,7 +189,7 @@ static LttvLibrary *library_load(char *name, GError **error) module_chain = NULL; module_next = &module_chain; gm = g_module_open(pathname,0); - g_free(pathname); + g_free(pathname); if(gm != NULL) break; @@ -226,8 +226,8 @@ static LttvLibrary *library_load(char *name, GError **error) LttvLibrary *lttv_library_load(char *name, GError **error) { - LttvLibrary *l = library_load(name, error); - l->info.load_count++; + LttvLibrary *l = library_load(name, error); + if(l != NULL) l->info.load_count++; return l; } @@ -459,14 +459,14 @@ LttvLibrary *lttv_library_get(unsigned i) } -void lttv_library_path_add(char *name) +void lttv_library_path_add(const char *name) { g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "Add library path %s", name); g_ptr_array_add(library_paths,(char*)g_strdup(name)); } -void lttv_library_path_remove(char *name) +void lttv_library_path_remove(const char *name) { guint i;