summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/gtk/common/credentials.c6
-rw-r--r--source4/gtk/common/select.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/source4/gtk/common/credentials.c b/source4/gtk/common/credentials.c
index 0646131b73..31e2bcf811 100644
--- a/source4/gtk/common/credentials.c
+++ b/source4/gtk/common/credentials.c
@@ -52,7 +52,8 @@ static void gtk_get_credentials(struct cli_credentials *credentials)
gtk_table_attach(GTK_TABLE(table), entry_domain, 1,2,0,1, GTK_FILL, 0,0,0);
gtk_entry_set_activates_default (GTK_ENTRY (entry_domain), TRUE);
- if (credentials->domain_obtained != CRED_UNINITIALISED) {
+ if (credentials->domain_obtained != CRED_UNINITIALISED &&
+ credentials->domain) {
gtk_entry_set_text(GTK_ENTRY(entry_domain), credentials->domain);
}
@@ -75,7 +76,8 @@ static void gtk_get_credentials(struct cli_credentials *credentials)
gtk_table_attach(GTK_TABLE(table),entry_password,1,2,3,4,GTK_FILL,0,0,0);
gtk_entry_set_visibility (GTK_ENTRY (entry_password), FALSE);
gtk_entry_set_activates_default (GTK_ENTRY (entry_password), TRUE);
- if (credentials->password_obtained != CRED_UNINITIALISED) {
+ if (credentials->password_obtained != CRED_UNINITIALISED &&
+ credentials->password) {
gtk_entry_set_text(GTK_ENTRY(entry_password), credentials->password);
}
diff --git a/source4/gtk/common/select.c b/source4/gtk/common/select.c
index 0547525cf3..5a0480ab28 100644
--- a/source4/gtk/common/select.c
+++ b/source4/gtk/common/select.c
@@ -293,11 +293,13 @@ struct dcerpc_pipe *gtk_connect_rpc_interface(TALLOC_CTX *mem_ctx, const struct
if(!NT_STATUS_IS_OK(status)) {
gtk_show_ntstatus(NULL, "While connecting to interface", status);
gtk_widget_destroy(GTK_WIDGET(d));
- talloc_free(mem_ctx);
+ talloc_free(cred);
return NULL;
}
gtk_widget_destroy(GTK_WIDGET(d));
+
+ talloc_free(cred);
return pipe;
}