summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/membuffer.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source3/lib/membuffer.c b/source3/lib/membuffer.c
index 85f63e8c06..18e9fa9453 100644
--- a/source3/lib/membuffer.c
+++ b/source3/lib/membuffer.c
@@ -313,16 +313,19 @@ static BOOL mem_find(struct mem_buf **buf, uint32 offset)
while (f != NULL && offset >= f->offset.end)
{
- f = f->next;
-
DEBUG(200,("mem_find: next[%d..%d]\n",
- f->offset.start, f->offset.end));
+ f->offset.start, f->offset.end));
+
+ f = f->next;
}
(*buf) = f;
- DEBUG(200,("mem_find: found data[%d..%d]\n",
- (*buf)->offset.start,(*buf)->offset.end));
+ if (f != NULL)
+ {
+ DEBUG(200,("mem_find: found data[%d..%d]\n",
+ (*buf)->offset.start,(*buf)->offset.end));
+ }
return f != NULL;
}