From 1713b43c1a28aadfecf641dfdd6e070ef3dfba1b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 24 Aug 2006 11:24:06 +0000 Subject: r17792: io.out.winsserver is a const char *, and iname->winserver = talloc_steal(iname, io.out.winsserver) generated a warning, so I changed iname->winsserver to also be a const char *. then a talloc_free(iname->winsserver) would generate a warning, but we can steal it into the tmp_ctx without a warning and that gets free'ed a few lines later. metze (This used to be commit fdef17f81e5fc48cca3dd7611d6d5007147473b1) --- source4/nbt_server/wins/winsclient.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'source4/nbt_server/wins') 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); -- cgit