Skip to content

Commit

Permalink
Import fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
paolostivanin committed Feb 28, 2024
1 parent e1683b9 commit 7ef0613
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 29 deletions.
16 changes: 8 additions & 8 deletions src/common/aegis.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,15 +483,15 @@ parse_aegis_json_data (const gchar *data,
}

if (!skip) {
otps = g_slist_append (otps, g_memdup2 (otp, sizeof (otp_t)));
otps = g_slist_append (otps, otp);
} else {
gcry_free (otp->secret);
g_free (otp->issuer);
g_free (otp->account_name);
g_free (otp->algo);
g_free (otp->type);
g_free (otp);
}

gcry_free (otp->secret);
g_free (otp->issuer);
g_free (otp->account_name);
g_free (otp->algo);
g_free (otp->type);
g_free (otp);
}

json_decref (root);
Expand Down
4 changes: 1 addition & 3 deletions src/common/andotp.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,7 @@ parse_andotp_json_data (const gchar *data,
json_decref (obj);
return NULL;
}

otps = g_slist_append (otps, g_memdup2 (otp, sizeof (otp_t)));
g_free (otp);
otps = g_slist_append (otps, otp);
}

json_decref (array);
Expand Down
16 changes: 8 additions & 8 deletions src/common/authpro.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,15 +293,15 @@ parse_authpro_json_data (const gchar *data,
}

if (!skip) {
otps = g_slist_append (otps, g_memdup2 (otp, sizeof (otp_t)));
otps = g_slist_append (otps, otp);
} else {
gcry_free (otp->secret);
g_free (otp->issuer);
g_free (otp->account_name);
g_free (otp->algo);
g_free (otp->type);
g_free (otp);
}

gcry_free (otp->secret);
g_free (otp->issuer);
g_free (otp->account_name);
g_free (otp->algo);
g_free (otp->type);
g_free (otp);
}

json_decref (root);
Expand Down
16 changes: 8 additions & 8 deletions src/common/twofas.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,15 +396,15 @@ parse_twofas_json_data (const gchar *data,
}

if (!skip) {
otps = g_slist_append (otps, g_memdup2 (otp, sizeof (otp_t)));
otps = g_slist_append (otps, otp);
} else {
gcry_free (otp->secret);
g_free (otp->issuer);
g_free (otp->account_name);
g_free (otp->algo);
g_free (otp->type);
g_free (otp);
}

gcry_free (otp->secret);
g_free (otp->issuer);
g_free (otp->account_name);
g_free (otp->algo);
g_free (otp->type);
g_free (otp);
}

json_decref (array);
Expand Down
3 changes: 1 addition & 2 deletions src/imports.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ free_otps_gslist (GSList *otps,
g_free (otp_data->issuer);
gcry_free (otp_data->secret);
}

g_slist_free_full (otps, g_free);
g_slist_free (otps);
}


Expand Down

0 comments on commit 7ef0613

Please sign in to comment.