Skip to content

Commit

Permalink
fix memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
afonot authored and lpereira committed May 15, 2023
1 parent a12860c commit 3ddd8c9
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions modules/devices/e2k/processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,30 +238,26 @@ gchar *caches_summary(GSList * processors)
return ret;
}

gchar *processor_get_full_name(gchar *model_name)
static gchar *processor_get_full_name(const gchar *model_name)
{
gchar *full_name;

if(g_strcmp0(model_name ,"E2S") == 0)
full_name = g_strdup("Elbrus-4C");
return "Elbrus-4C";
else if(g_strcmp0(model_name ,"E1C+") == 0)
full_name = g_strdup("Elbrus-1C+");
return "Elbrus-1C+";
else if(g_strcmp0(model_name ,"E2C+DSP") == 0)
full_name = g_strdup("Elbrus-2C+");
return "Elbrus-2C+";
else if(g_strcmp0(model_name ,"E8C") == 0)
full_name = g_strdup("Elbrus-8C");
return "Elbrus-8C";
else if(g_strcmp0(model_name ,"E8C2") == 0)
full_name = g_strdup("Elbrus-8CB");
return "Elbrus-8CB";
else if(g_strcmp0(model_name ,"E12C") == 0)
full_name = g_strdup("Elbrus-12C");
return "Elbrus-12C";
else if(g_strcmp0(model_name ,"E16C") == 0)
full_name = g_strdup("Elbrus-16C");
return "Elbrus-16C";
else if(g_strcmp0(model_name ,"E2C3") == 0)
full_name = g_strdup("Elbrus-2C3");
return "Elbrus-2C3";
else
full_name = model_name;

return full_name;
return (gchar *)model_name;
}

GSList *processor_scan(void)
Expand Down

0 comments on commit 3ddd8c9

Please sign in to comment.