diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-05-03 10:05:08 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:05:34 -0500 |
commit | 0bcfa67f0e36e65f5d14a5d1f8592a7ad943761f (patch) | |
tree | 5b90b5f971d4924e5342f4dec8cd41a4cf3e4c3f /source4 | |
parent | 38efc3e0d5dcd8a32f43729ff0a2d0a025cd10fc (diff) | |
download | samba-0bcfa67f0e36e65f5d14a5d1f8592a7ad943761f.tar.gz samba-0bcfa67f0e36e65f5d14a5d1f8592a7ad943761f.tar.bz2 samba-0bcfa67f0e36e65f5d14a5d1f8592a7ad943761f.zip |
r15410: Fix segfaults
(This used to be commit e8de80afb9d13c5c84bf70c9de3083d8caba9eb8)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/gtk/common/credentials.c | 6 | ||||
-rw-r--r-- | source4/gtk/common/select.c | 4 |
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; } |