diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c index 1e1681ba37..4a3588e9ab 100644 --- a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c +++ b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c @@ -249,6 +249,8 @@ static void callback_do_reboot(GtkWidget *widget, SAFE_FREE(buffer); state->name_type_new = type; #endif + NetApiBufferFree((void *)buffer); + gtk_label_set_text(GTK_LABEL(state->label_current_name_buffer), state->name_buffer_new); if (state->name_type_new == NetSetupDomainName) { @@ -1292,8 +1294,12 @@ static int initialize_join_state(struct join_state *state, if (status) { return status; } - state->name_buffer_initial = (char *)buffer; + state->name_buffer_initial = strdup(buffer); + if (!state->name_buffer_initial) { + return -1; + } state->name_type_initial = type; + NetApiBufferFree((void *)buffer); } { @@ -1311,6 +1317,7 @@ static int initialize_join_state(struct join_state *state, if (!state->comment) { return -1; } + NetApiBufferFree(buffer); } #if 0 { |