summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-03-27 14:19:05 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2017-03-28 10:26:07 +0200
commit8b99f1648c3bf7fe395ba4d194dbd56f766754ac (patch)
tree3557ff09bbbe8b8ecefd8fa52323937b58255f39
parent48f12c6466c14f51bc3a2bba9b06772207e9ef33 (diff)
downloadouroboros-8b99f1648c3bf7fe395ba4d194dbd56f766754ac.tar.gz
ouroboros-8b99f1648c3bf7fe395ba4d194dbd56f766754ac.zip
ipcpd: normal: Fix invalid free of pci
The PCI was being freed by frct, but it was stack memory which was created in the fmgr, resulting in an illegal free.
-rw-r--r--src/ipcpd/normal/frct.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/ipcpd/normal/frct.c b/src/ipcpd/normal/frct.c
index 8bf080ce..01bdb660 100644
--- a/src/ipcpd/normal/frct.c
+++ b/src/ipcpd/normal/frct.c
@@ -227,7 +227,6 @@ int frct_nm1_post_sdu(struct pci * pci,
if (fmgr_np1_post_buf(id, &buf)) {
log_err("Failed to hand buffer to FMGR.");
- free(pci);
return -1;
}
} else if (pci->pdu_type == PDU_TYPE_MGMT) {
@@ -246,20 +245,16 @@ int frct_nm1_post_sdu(struct pci * pci,
if (fmgr_np1_post_buf(pci->dst_cep_id, &buf)) {
log_err("Failed to hand buffer to Flow Manager.");
- free(pci);
return -1;
}
} else {
/* FIXME: Known cep-ids are delivered to FMGR (minimal DTP) */
if (fmgr_np1_post_sdu(pci->dst_cep_id, sdb)) {
log_err("Failed to hand SDU to FMGR.");
- free(pci);
return -1;
}
}
- free(pci);
-
return 0;
}