Browse Source

simplify message_dup(): remove unneeded variables and if() branches.

zos_support2
roker 8 months ago
parent
commit
ba609fd664
1 changed files with 1 additions and 10 deletions
  1. +1
    -10
      src/message.c

+ 1
- 10
src/message.c View File

@ -55,8 +55,6 @@ DYNAMIC_API void free_message(message *msg)
DYNAMIC_API message * message_dup(const message *src)
{
message * msg = NULL;
pEp_identity * from = NULL;
identity_list * to = NULL;
assert(src);
@ -200,14 +198,7 @@ DYNAMIC_API message * message_dup(const message *src)
return msg;
enomem:
if (msg) {
free_message(msg);
}
else {
free_identity(from);
free_identity_list(to);
}
free_message(msg);
return NULL;
}


Loading…
Cancel
Save