From Alexander Bokovoy
authorJeremy Allison <jra@samba.org>
Mon, 14 Jan 2008 19:06:46 +0000 (11:06 -0800)
committerJeremy Allison <jra@samba.org>
Mon, 14 Jan 2008 19:06:46 +0000 (11:06 -0800)
names is a 'const char **names' here, passed from upper level. Passing
'names' as a talloc context will break things as 'names' is usually
likely is a local variable, not a talloc'd. And we want to have array
elements on a context of the array anyway.

Jeremy.

source/lib/winbind_util.c

index 3cf068a6e0da11d812a89c4f3954ce066f960e90..14356b09cf7b9d22b88621d871062d18856a12d0 100644 (file)
@@ -201,7 +201,7 @@ bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
        *types       = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, num_rids);
 
        for(i=0; i<num_rids; i++) {
-               (*names)[i] = talloc_strdup(names, namelist[i]);
+               (*names)[i] = talloc_strdup(*names, namelist[i]);
                (*types)[i] = (enum lsa_SidType)name_types[i];
        }