Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Fixed leaks in freeing key and signature lists
Browse files Browse the repository at this point in the history
  • Loading branch information
dkonigsberg committed Nov 5, 2016
1 parent cc3d8c7 commit 7d618a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/curve.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,12 +458,12 @@ void ec_public_key_list_free(ec_public_key_list *list)
{
unsigned int size;
unsigned int i;
ec_public_key *p;
ec_public_key **p;
if(list) {
size = utarray_len(list->values);
for (i = 0; i < size; i++) {
p = (ec_public_key *)utarray_eltptr(list->values, i);
SIGNAL_UNREF(p);
p = (ec_public_key **)utarray_eltptr(list->values, i);
SIGNAL_UNREF(*p);
}
utarray_free(list->values);
free(list);
Expand Down
6 changes: 3 additions & 3 deletions src/device_consistency.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,12 +633,12 @@ void device_consistency_signature_list_free(device_consistency_signature_list *l
{
unsigned int size;
unsigned int i;
device_consistency_signature *p;
device_consistency_signature **p;
if(list) {
size = utarray_len(list->values);
for (i = 0; i < size; i++) {
p = (device_consistency_signature *)utarray_eltptr(list->values, i);
SIGNAL_UNREF(p);
p = (device_consistency_signature **)utarray_eltptr(list->values, i);
SIGNAL_UNREF(*p);
}
utarray_free(list->values);
free(list);
Expand Down

0 comments on commit 7d618a5

Please sign in to comment.