From f34d928ee8cbc1c8226ef8941729a5f3e03c86bf Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Sun, 8 Mar 1998 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1998-03-08 --- ip/ip.c | 7 ++++--- pc/vgaclgd542x.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ip/ip.c b/ip/ip.c index b8b1a5364328318dfdf0a3e1d014190c49af4d89..d9105e75dada35645dbdcf1e180872bfe0554c2b 100644 --- a/ip/ip.c +++ b/ip/ip.c @@ -100,21 +100,21 @@ ipoput(Block *bp, int gating, int ttl) chunk = nhgets(eh->length); if(chunk > len){ netlog(Logip, "short gated packet\n"); - goto raise; + goto free; } if(chunk < len) len = chunk; } if(len >= IP_MAX){ netlog(Logip, "exceeded ip max size %V\n", eh->dst); - goto raise; + goto free; } r = v4lookup(eh->dst); if(r == nil){ stats.noroute++; netlog(Logip, "no interface %V\n", eh->dst); - goto raise; + goto free; } if(r->type & (Rifc|Runi|Rbcast|Rmulti)) gate = eh->dst; @@ -224,6 +224,7 @@ ipoput(Block *bp, int gating, int ttl) raise: runlock(ifc); poperror(); +free: freeblist(bp); } diff --git a/pc/vgaclgd542x.c b/pc/vgaclgd542x.c index db25ae8409b24b2d153a492a318cb6453a57f27e..3a0d0481cbd5152cbd8ac2aa45a93135be718f46 100644 --- a/pc/vgaclgd542x.c +++ b/pc/vgaclgd542x.c @@ -58,8 +58,8 @@ clgd542xenable(VGAscr* scr) /* * Disable the cursor. */ - sr12 = vgaxi(Seqx, 0x12); - vgaxo(Seqx, 0x12, sr12 & ~0x01); + sr12 = vgaxi(Seqx, 0x12) & ~0x01; + vgaxo(Seqx, 0x12, sr12); /* * Cursor colours.