lib: Use "mem_ctx" arg in gencache_get
[mat/samba.git] / source3 / auth / user_util.c
index b52f1dd5bcbde0ee8e7555b1c6a0ae961d472c5f..70ab5ade654bb1710bd25a908349859b72083bee 100644 (file)
@@ -96,14 +96,13 @@ static bool fetch_map_from_gencache(TALLOC_CTX *ctx,
        if (key == NULL) {
                return false;
        }
-       found = gencache_get(key, NULL, &value, NULL);
+       found = gencache_get(key, ctx, &value, NULL);
        TALLOC_FREE(key);
        if (!found) {
                return false;
        }
        TALLOC_FREE(*p_user_out);
-       *p_user_out = talloc_strdup(ctx, value);
-       SAFE_FREE(value);
+       *p_user_out = value;
        if (!*p_user_out) {
                return false;
        }