s3: smbd: dfs: Make parameter names consistent.
authorJeremy Allison <jra@samba.org>
Tue, 28 Jan 2020 17:28:30 +0000 (09:28 -0800)
committerKarolin Seeger <kseeger@samba.org>
Wed, 19 Feb 2020 06:19:36 +0000 (06:19 +0000)
Initialize reflist to NULL.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit ed527dc1d8bd21d942bc14677d83363144e5f46b)

source3/smbd/msdfs.c

index 546f3919161c623c8a92ad44445058571ccef8e7..553e914de8ef612c378c597842fe6b02d0b61f12 100644 (file)
@@ -526,14 +526,14 @@ static void shuffle_strlist(char **list, int count)
 bool parse_msdfs_symlink(TALLOC_CTX *ctx,
                        bool shuffle_referrals,
                        const char *target,
-                       struct referral **preflist,
-                       size_t *refcount)
+                       struct referral **ppreflist,
+                       size_t *prefcount)
 {
        char *temp = NULL;
        char *prot;
        char **alt_path = NULL;
        size_t count = 0, i;
-       struct referral *reflist;
+       struct referral *reflist = NULL;
        char *saveptr;
 
        temp = talloc_strdup(ctx, target);
@@ -601,11 +601,11 @@ bool parse_msdfs_symlink(TALLOC_CTX *ctx,
                        reflist[i].alternate_path);
        }
 
-       if (preflist != NULL) {
-               *preflist = reflist;
+       if (ppreflist != NULL) {
+               *ppreflist = reflist;
        }
-       if (refcount != NULL) {
-               *refcount = count;
+       if (prefcount != NULL) {
+               *prefcount = count;
        }
        TALLOC_FREE(alt_path);
        return true;