summaryrefslogtreecommitdiffstats
path: root/source3/lib/gencache.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/gencache.c')
-rw-r--r--source3/lib/gencache.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index 835f5e17d5..168b51191e 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -723,7 +723,11 @@ bool gencache_get(const char *keystr, TALLOC_CTX *mem_ctx, char **value,
return false;
}
if (value) {
- *value = talloc_move(mem_ctx, (char **)&blob.data);
+ /*
+ * talloc_move generates a type-punned warning here. As we
+ * leave the function immediately, do a simple talloc_steal.
+ */
+ *value = (char *)talloc_steal(mem_ctx, blob.data);
return true;
}
data_blob_free(&blob);