Skip to content

Commit

Permalink
asr: Fix memory corruption due to double free
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias committed Sep 21, 2024
1 parent 4145e95 commit d2e1c4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/asr.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ void asr_free(asr_client_t asr)
}
}

int asr_send_validation_packet_info(asr_client_t asr, uint64_t ipsw_size) {
int asr_send_validation_packet_info(asr_client_t asr, uint64_t ipsw_size)
{
plist_t payload_info = plist_new_dict();
plist_dict_set_item(payload_info, "Port", plist_new_uint(1));
plist_dict_set_item(payload_info, "Size", plist_new_uint(ipsw_size));
Expand All @@ -223,7 +224,6 @@ int asr_send_validation_packet_info(asr_client_t asr, uint64_t ipsw_size) {
return -1;
}
plist_free(packet_info);
plist_free(payload_info);

return 0;
}
Expand Down

0 comments on commit d2e1c4f

Please sign in to comment.