Loading drivers/net/slip.c +12 −18 Original line number Diff line number Diff line Loading @@ -185,14 +185,11 @@ sl_alloc_bufs(struct slip *sl, int mtu) /* Cleanup */ err_exit: #ifdef SL_INCLUDE_CSLIP if (cbuff) kfree(cbuff); if (slcomp) slhc_free(slcomp); #endif if (xbuff) kfree(xbuff); if (rbuff) kfree(rbuff); return err; } Loading @@ -204,12 +201,12 @@ sl_free_bufs(struct slip *sl) void * tmp; /* Free all SLIP frame buffers. */ if ((tmp = xchg(&sl->rbuff, NULL)) != NULL) tmp = xchg(&sl->rbuff, NULL); kfree(tmp); if ((tmp = xchg(&sl->xbuff, NULL)) != NULL) tmp = xchg(&sl->xbuff, NULL); kfree(tmp); #ifdef SL_INCLUDE_CSLIP if ((tmp = xchg(&sl->cbuff, NULL)) != NULL) tmp = xchg(&sl->cbuff, NULL); kfree(tmp); if ((tmp = xchg(&sl->slcomp, NULL)) != NULL) slhc_free(tmp); Loading Loading @@ -297,12 +294,9 @@ static int sl_realloc_bufs(struct slip *sl, int mtu) spin_unlock_bh(&sl->lock); done: if (xbuff) kfree(xbuff); if (rbuff) kfree(rbuff); #ifdef SL_INCLUDE_CSLIP if (cbuff) kfree(cbuff); #endif return err; Loading Loading
drivers/net/slip.c +12 −18 Original line number Diff line number Diff line Loading @@ -185,14 +185,11 @@ sl_alloc_bufs(struct slip *sl, int mtu) /* Cleanup */ err_exit: #ifdef SL_INCLUDE_CSLIP if (cbuff) kfree(cbuff); if (slcomp) slhc_free(slcomp); #endif if (xbuff) kfree(xbuff); if (rbuff) kfree(rbuff); return err; } Loading @@ -204,12 +201,12 @@ sl_free_bufs(struct slip *sl) void * tmp; /* Free all SLIP frame buffers. */ if ((tmp = xchg(&sl->rbuff, NULL)) != NULL) tmp = xchg(&sl->rbuff, NULL); kfree(tmp); if ((tmp = xchg(&sl->xbuff, NULL)) != NULL) tmp = xchg(&sl->xbuff, NULL); kfree(tmp); #ifdef SL_INCLUDE_CSLIP if ((tmp = xchg(&sl->cbuff, NULL)) != NULL) tmp = xchg(&sl->cbuff, NULL); kfree(tmp); if ((tmp = xchg(&sl->slcomp, NULL)) != NULL) slhc_free(tmp); Loading Loading @@ -297,12 +294,9 @@ static int sl_realloc_bufs(struct slip *sl, int mtu) spin_unlock_bh(&sl->lock); done: if (xbuff) kfree(xbuff); if (rbuff) kfree(rbuff); #ifdef SL_INCLUDE_CSLIP if (cbuff) kfree(cbuff); #endif return err; Loading