Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 406
b: refs/heads/master
c: 158a0e4
h: refs/heads/master
v: v3
  • Loading branch information
Jesper Juhl authored and David S. Miller committed Apr 25, 2005
1 parent e12cd9d commit 3f9d2a1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 18900829f32443658ca4d4793c01621c75d551c1
refs/heads/master: 158a0e45b69254a9ee4d7795e3b98d8c959fb799
30 changes: 12 additions & 18 deletions trunk/drivers/net/slip.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,12 @@ sl_alloc_bufs(struct slip *sl, int mtu)
/* Cleanup */
err_exit:
#ifdef SL_INCLUDE_CSLIP
if (cbuff)
kfree(cbuff);
kfree(cbuff);
if (slcomp)
slhc_free(slcomp);
#endif
if (xbuff)
kfree(xbuff);
if (rbuff)
kfree(rbuff);
kfree(xbuff);
kfree(rbuff);
return err;
}

Expand All @@ -204,13 +201,13 @@ sl_free_bufs(struct slip *sl)
void * tmp;

/* Free all SLIP frame buffers. */
if ((tmp = xchg(&sl->rbuff, NULL)) != NULL)
kfree(tmp);
if ((tmp = xchg(&sl->xbuff, NULL)) != NULL)
kfree(tmp);
tmp = xchg(&sl->rbuff, NULL);
kfree(tmp);
tmp = xchg(&sl->xbuff, NULL);
kfree(tmp);
#ifdef SL_INCLUDE_CSLIP
if ((tmp = xchg(&sl->cbuff, NULL)) != NULL)
kfree(tmp);
tmp = xchg(&sl->cbuff, NULL);
kfree(tmp);
if ((tmp = xchg(&sl->slcomp, NULL)) != NULL)
slhc_free(tmp);
#endif
Expand Down Expand Up @@ -297,13 +294,10 @@ static int sl_realloc_bufs(struct slip *sl, int mtu)
spin_unlock_bh(&sl->lock);

done:
if (xbuff)
kfree(xbuff);
if (rbuff)
kfree(rbuff);
kfree(xbuff);
kfree(rbuff);
#ifdef SL_INCLUDE_CSLIP
if (cbuff)
kfree(cbuff);
kfree(cbuff);
#endif
return err;
}
Expand Down

0 comments on commit 3f9d2a1

Please sign in to comment.