mirror of
https://github.com/stefanberger/swtpm.git
synced 2026-08-09 08:25:44 +00:00
swtpm: Have get_profiles return -1 on error
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
12b0b4013a
commit
2ede504c75
@ -162,8 +162,8 @@ static int get_profiles(gchar **profiles)
|
||||
JsonReader *jr = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
JsonNode *root;
|
||||
int ret = -1;
|
||||
gint i, num;
|
||||
int ret = 0;
|
||||
GString *gstr = g_string_new("\"names\": [ ");
|
||||
|
||||
jp = json_parser_new();
|
||||
@ -206,6 +206,7 @@ static int get_profiles(gchar **profiles)
|
||||
"RuntimeCommands", ", \"commands\"", " "))
|
||||
goto error_unref_jr;
|
||||
|
||||
ret = 0;
|
||||
|
||||
error_unref_jr:
|
||||
g_object_unref(jr);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user