summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorAnand V. Avati <avati@amp.gluster.com>2009-04-16 17:32:05 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-04-16 17:32:05 +0530
commit7ae141bb054494c86cfb60b377ab989c30938f66 (patch)
tree4c34646b89da443c62abe979bcfc8aae808b7acd /libglusterfs
parent6bc3f3c19b9e720ade3702ce409a8a99cc13f1dc (diff)
add NULL check in iobuf_arena_destroy
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/iobuf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c
index af798c4b6..a10dc6f84 100644
--- a/libglusterfs/src/iobuf.c
+++ b/libglusterfs/src/iobuf.c
@@ -75,6 +75,9 @@ __iobuf_arena_destroy_iobufs (struct iobuf_arena *iobuf_arena)
page_size = iobuf_arena->iobuf_pool->page_size;
iobuf_cnt = arena_size / page_size;
+ if (!iobuf_arena->iobufs)
+ return;
+
iobuf = iobuf_arena->iobufs;
for (i = 0; i < iobuf_cnt; i++) {
assert (iobuf->ref == 0);