mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix uninitialized memory access in webservice download
In download_dialog_release_xml() we check if state->xmldata is non-NULL and free it. But we don't set it to NULL anywhere, so if the user hits cancel the variable is undefined. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a635c30564
commit
31b2a6ffa8
1 changed files with 1 additions and 1 deletions
|
@ -218,7 +218,7 @@ void webservice_download_dialog(void)
|
|||
const gchar *current_uid = subsurface_get_conf("webservice_uid");
|
||||
GtkWidget *dialog, *vbox, *status, *info, *uid;
|
||||
GtkWidget *frame_uid, *frame_status, *download, *image, *apply;
|
||||
struct download_dialog_state *state = malloc(sizeof(struct download_dialog_state));
|
||||
struct download_dialog_state *state = calloc(1, sizeof(struct download_dialog_state));
|
||||
gboolean has_previous_uid = TRUE;
|
||||
|
||||
if (!current_uid) {
|
||||
|
|
Loading…
Add table
Reference in a new issue