summaryrefslogtreecommitdiff
path: root/source4/nbt_server/wins
diff options
context:
space:
mode:
Diffstat (limited to 'source4/nbt_server/wins')
-rw-r--r--source4/nbt_server/wins/winsclient.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/nbt_server/wins/winsclient.c b/source4/nbt_server/wins/winsclient.c
index bfaf1edbde..458d1a434d 100644
--- a/source4/nbt_server/wins/winsclient.c
+++ b/source4/nbt_server/wins/winsclient.c
@@ -111,7 +111,11 @@ static void nbtd_wins_refresh_handler(struct composite_context *c)
/* success - start a periodic name refresh */
iname->nb_flags |= NBT_NM_ACTIVE;
if (iname->wins_server) {
- talloc_free(iname->wins_server);
+ /*
+ * talloc_free() would generate a warning,
+ * so steal it into the tmp context
+ */
+ talloc_steal(tmp_ctx, iname->wins_server);
}
iname->wins_server = talloc_steal(iname, io.out.wins_server);
@@ -204,7 +208,11 @@ static void nbtd_wins_register_handler(struct composite_context *c)
/* success - start a periodic name refresh */
iname->nb_flags |= NBT_NM_ACTIVE;
if (iname->wins_server) {
- talloc_free(iname->wins_server);
+ /*
+ * talloc_free() would generate a warning,
+ * so steal it into the tmp context
+ */
+ talloc_steal(tmp_ctx, iname->wins_server);
}
iname->wins_server = talloc_steal(iname, io.out.wins_server);