diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2017-03-27 14:19:05 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2017-03-28 10:26:07 +0200 |
commit | 8b99f1648c3bf7fe395ba4d194dbd56f766754ac (patch) | |
tree | 3557ff09bbbe8b8ecefd8fa52323937b58255f39 /src/ipcpd/normal/frct.c | |
parent | 48f12c6466c14f51bc3a2bba9b06772207e9ef33 (diff) | |
download | ouroboros-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.
Diffstat (limited to 'src/ipcpd/normal/frct.c')
-rw-r--r-- | src/ipcpd/normal/frct.c | 5 |
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; } |