mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-04 10:14:29 +03:00
fix coverity 1109891
This commit is contained in:
parent
6ca908a192
commit
9c707c8df0
15
gtk/gui.c
15
gtk/gui.c
@ -764,7 +764,7 @@ void gui_cert_verify(nsurl *url, const struct ssl_cert_info *certs,
|
|||||||
static struct nsgtk_treeview *ssl_window;
|
static struct nsgtk_treeview *ssl_window;
|
||||||
struct sslcert_session_data *data;
|
struct sslcert_session_data *data;
|
||||||
GtkButton *accept, *reject;
|
GtkButton *accept, *reject;
|
||||||
void **session = calloc(sizeof(void *), 3);
|
void **session;
|
||||||
GtkWindow *window;
|
GtkWindow *window;
|
||||||
GtkScrolledWindow *scrolled;
|
GtkScrolledWindow *scrolled;
|
||||||
GtkDrawingArea *drawing_area;
|
GtkDrawingArea *drawing_area;
|
||||||
@ -778,19 +778,26 @@ void gui_cert_verify(nsurl *url, const struct ssl_cert_info *certs,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sslcert_viewer_create_session_data(num, url, cb, cbpw, certs,
|
sslcert_viewer_create_session_data(num, url, cb, cbpw, certs, &data);
|
||||||
&data);
|
|
||||||
ssl_current_session = data;
|
ssl_current_session = data;
|
||||||
|
|
||||||
window = GTK_WINDOW(gtk_builder_get_object(builder, "wndSSLProblem"));
|
window = GTK_WINDOW(gtk_builder_get_object(builder, "wndSSLProblem"));
|
||||||
scrolled = GTK_SCROLLED_WINDOW(gtk_builder_get_object(builder, "SSLScrolled"));
|
scrolled = GTK_SCROLLED_WINDOW(gtk_builder_get_object(builder, "SSLScrolled"));
|
||||||
drawing_area = GTK_DRAWING_AREA(gtk_builder_get_object(builder, "SSLDrawingArea"));
|
drawing_area = GTK_DRAWING_AREA(gtk_builder_get_object(builder, "SSLDrawingArea"));
|
||||||
|
|
||||||
|
session = calloc(sizeof(void *), 3);
|
||||||
|
|
||||||
|
if (session == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ssl_window = nsgtk_treeview_create(TREE_SSLCERT, window, scrolled,
|
ssl_window = nsgtk_treeview_create(TREE_SSLCERT, window, scrolled,
|
||||||
drawing_area);
|
drawing_area);
|
||||||
|
|
||||||
if (ssl_window == NULL)
|
if (ssl_window == NULL) {
|
||||||
|
free(session);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
accept = GTK_BUTTON(gtk_builder_get_object(builder, "sslaccept"));
|
accept = GTK_BUTTON(gtk_builder_get_object(builder, "sslaccept"));
|
||||||
reject = GTK_BUTTON(gtk_builder_get_object(builder, "sslreject"));
|
reject = GTK_BUTTON(gtk_builder_get_object(builder, "sslreject"));
|
||||||
|
Loading…
Reference in New Issue
Block a user