patch-2.2.18 linux/drivers/telephony/ixj.c

Next file: linux/drivers/telephony/ixj.h
Previous file: linux/drivers/sound/ymfpci_image.h
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/drivers/telephony/ixj.c linux/drivers/telephony/ixj.c
@@ -732,7 +732,7 @@
 						if (j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.Caller_ID) {
 							if (j->daa_mode == SOP_PU_RINGING && j->flags.pstn_ringing) {
 								j->pstn_cid_intr = 1;
-								j->pstn_cid_recieved = jiffies;
+								j->pstn_cid_received = jiffies;
 							}
 						}
 					} else {
@@ -740,7 +740,7 @@
 							daa_int_read(board);
 						}
 						j->ex.bits.pstn_ring = 0;
-						if (j->pstn_cid_intr && jiffies > j->pstn_cid_recieved + (hertz * 3)) {
+						if (j->pstn_cid_intr && jiffies > j->pstn_cid_received + (hertz * 3)) {
 							if (j->daa_mode == SOP_PU_RINGING) {
 								ixj_daa_cid_read(board);
 								j->ex.bits.caller_id = 1;
@@ -4473,14 +4473,21 @@
 	if (lcp == NULL)
 		return -ENOMEM;
 	if (copy_from_user(lcp, (char *) cp, sizeof(IXJ_CADENCE)))
+	{
+		kfree(lcp);
 		return -EFAULT;
+	}
 	lcep = kmalloc(sizeof(IXJ_CADENCE_ELEMENT) * lcp->elements_used, GFP_KERNEL);
 	if (lcep == NULL) {
 		kfree(lcp);
 		return -ENOMEM;
 	}
 	if (copy_from_user(lcep, lcp->ce, sizeof(IXJ_CADENCE_ELEMENT) * lcp->elements_used))
+	{
+		kfree(lcep);
+		kfree(lcp);
 		return -EFAULT;
+	}
 	if (j->cadence_t) {
 		kfree(j->cadence_t->ce);
 		kfree(j->cadence_t);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)