Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
linderd committed Aug 29, 2023
1 parent 94331ac commit 2538ef1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/cflite_batch.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: ClusterFuzzLite batch fuzzing
on:
push
#schedule:
#- cron: '0 0/6 * * *' # Every 6th hour. Change this to whatever is suitable.
schedule:
- cron: '0 0/6 * * *' # Every 6th hour. Change this to whatever is suitable.
permissions: read-all
jobs:
BatchFuzzing:
Expand Down
1 change: 1 addition & 0 deletions iked/ikev2_pld.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,7 @@ ikev2_pld_cert(struct iked *env, struct ikev2_payload *pld,
return (0);
}
}

if (certid->id_buf) {
ibuf_free(certid->id_buf);
}
Expand Down
12 changes: 10 additions & 2 deletions regress/parser-libfuzzer/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ ikev2_msg_lookup(struct iked *env, struct iked_msgqueue *queue,
void
ikev2_msg_cleanup(struct iked *env, struct iked_message *msg)
{
struct iked_certreq *cr;
struct iked_certreq *cr;
struct iked_proposal *prop, *proptmp;
int i;

if (msg == msg->msg_parent) {
Expand All @@ -268,6 +269,14 @@ ikev2_msg_cleanup(struct iked *env, struct iked_message *msg)
free(msg->msg_cp_addr6);
free(msg->msg_cp_dns);

TAILQ_FOREACH_SAFE(prop, &msg->msg_proposals, prop_entry,
proptmp) {
TAILQ_REMOVE(&msg->msg_proposals, prop, prop_entry);
if (prop->prop_nxforms)
free(prop->prop_xforms);
free(prop);
}

msg->msg_nonce = NULL;
msg->msg_ke = NULL;
msg->msg_auth.id_buf = NULL;
Expand All @@ -284,7 +293,6 @@ ikev2_msg_cleanup(struct iked *env, struct iked_message *msg)
msg->msg_cp_addr6 = NULL;
msg->msg_cp_dns = NULL;

/* config_free_proposals(&msg->msg_proposals, 0); */
while ((cr = SIMPLEQ_FIRST(&msg->msg_certreqs))) {
ibuf_free(cr->cr_data);
SIMPLEQ_REMOVE_HEAD(&msg->msg_certreqs, cr_entry);
Expand Down

0 comments on commit 2538ef1

Please sign in to comment.