Commit 9ddf19c3 authored by platypro's avatar platypro

Fixed double free

parent a4bb630f
......@@ -504,9 +504,9 @@ bool destroyQ_internal(QUESTION* quiz, bool freeWidgetFields)
{
WIDGET* widget_next = widget->next;
WJECloseDocument(widget->options);
free(widget->type);
if(freeWidgetFields)
{
free(widget->type);
free(widget->key);
}
......@@ -519,7 +519,8 @@ bool destroyQ_internal(QUESTION* quiz, bool freeWidgetFields)
{
EXERTEMPLATE* temp_next = temp->next;
WJECloseDocument(temp->subs);
free(temp->src);
if(freeWidgetFields)
free(temp->src);
free(temp);
temp = temp_next;
}
......
......@@ -50,7 +50,7 @@ function processRequest()
{
if(this.status == 503)
{
document.getElementById("questionMessage").innerHTML = "Could not connect to backend!";
document.getElementById("answerStatus").innerHTML = "Could not connect to backend!";
}
var data = JSON.parse(this.responseText);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment