From d5d433e0c051cb0912421a1df3f239438928f7d2 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sun, 28 Feb 2010 13:54:05 +0100 Subject: Make some explicit NULL checks to pacify llvm-clang's static analyzer --- smbutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'smbutil.c') diff --git a/smbutil.c b/smbutil.c index 18aa1dc4..fd239d9c 100644 --- a/smbutil.c +++ b/smbutil.c @@ -85,7 +85,7 @@ static void dumpRaw(FILE *fp, unsigned char *buf, size_t len) /* helper macro to destructively resize buffers; assumes that bufsiz * is initialized to 0 if buf is unallocated! */ #define allocbuf(buf, bufsiz, need) do { \ - if ((need) > (bufsiz)) \ + if (!buf || (need) > (bufsiz)) \ { \ (bufsiz) = ((need) < 1024) ? 1024 : (need); \ xfree(buf); \ -- cgit v1.2.3