aboutsummaryrefslogtreecommitdiffstats
path: root/smbutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'smbutil.c')
-rw-r--r--smbutil.c2
1 files changed, 1 insertions, 1 deletions
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); \