Browse Source

BUGFIX: double free

doc_update_sequoia
Volker Birk 6 years ago
parent
commit
55534466a2
3 changed files with 7 additions and 1 deletions
  1. +3
    -1
      src/sync_impl.c
  2. +3
    -0
      src/sync_send_actions.c
  3. +1
    -0
      sync/gen_actions_skeleton.ysl2

+ 3
- 1
src/sync_impl.c View File

@ -211,7 +211,9 @@ PEP_STATUS multicast_self_msg(
return status;
for (identity_list *_i = own_identities; _i && _i->ident; _i = _i->next) {
pEp_identity *me = _i->ident;
pEp_identity *me = identity_dup(_i->ident);
if (!me)
goto enomem;
// FIXME: no deep copy for multicast supported yet
DeviceGroup_Protocol_t *_msg = malloc(sizeof(DeviceGroup_Protocol_t));


+ 3
- 0
src/sync_send_actions.c View File

@ -51,6 +51,7 @@ PEP_STATUS sendBeacon(
enomem:
status = PEP_OUT_OF_MEMORY;
error:
free(partner);
free_DeviceGroup_Protocol_msg(msg);
return status;
}
@ -93,6 +94,7 @@ PEP_STATUS sendHandshakeRequest(
enomem:
status = PEP_OUT_OF_MEMORY;
error:
free(partner);
free_DeviceGroup_Protocol_msg(msg);
return status;
}
@ -143,6 +145,7 @@ PEP_STATUS sendGroupKeys(
enomem:
status = PEP_OUT_OF_MEMORY;
error:
free(partner);
free_DeviceGroup_Protocol_msg(msg);
free_identity_list(kl);
return status;


+ 1
- 0
sync/gen_actions_skeleton.ysl2 View File

@ -198,6 +198,7 @@ tstylesheet {
enomem:
status = PEP_OUT_OF_MEMORY;
error:
free(partner);
free_DeviceGroup_Protocol_msg(msg);
`` if "$name='GroupKeys'" |> free_identity_list(kl);
return status;


Loading…
Cancel
Save