diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/msdfs.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index effe868657..9f203bfd19 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -264,10 +264,14 @@ static BOOL parse_msdfs_symlink(TALLOC_CTX *ctx, DEBUG(10,("parse_msdfs_symlink: count=%d\n", count)); - reflist = *preflist = TALLOC_ZERO_ARRAY(ctx, struct referral, count); - if(reflist == NULL) { - DEBUG(0,("parse_msdfs_symlink: talloc failed!\n")); - return False; + if (count) { + reflist = *preflist = TALLOC_ZERO_ARRAY(ctx, struct referral, count); + if(reflist == NULL) { + DEBUG(0,("parse_msdfs_symlink: talloc failed!\n")); + return False; + } + } else { + reflist = *preflist = NULL; } for(i=0;i<count;i++) { |