[dahdi-commits] tzafrir: linux/trunk r4705 - /linux/trunk/drivers/dahdi/dahdi-base.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Tue Aug 5 13:34:16 CDT 2008
Author: tzafrir
Date: Tue Aug 5 13:34:16 2008
New Revision: 4705
URL: http://svn.digium.com/view/dahdi?view=rev&rev=4705
Log:
Fix a small regression from r4667: Please don't NULL a good pointer.
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=4705&r1=4704&r2=4705
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Tue Aug 5 13:34:16 2008
@@ -853,9 +853,10 @@
numbufs = DAHDI_MAX_NUM_BUFS;
/* We need to allocate our buffers now */
- if (j && !(newbuf = kcalloc(j * 2, numbufs, GFP_KERNEL)))
- return -ENOMEM;
- else
+ if (j) {
+ if(!(newbuf = kcalloc(j * 2, numbufs, GFP_KERNEL)))
+ return -ENOMEM;
+ } else
newbuf = NULL;
/* Now that we've allocated our new buffer, we can safely
More information about the dahdi-commits
mailing list