From 8b99f1648c3bf7fe395ba4d194dbd56f766754ac Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Mon, 27 Mar 2017 14:19:05 +0200 Subject: 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. --- src/ipcpd/normal/frct.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3