Commit ef057f60 authored by Willem Thiart's avatar Willem Thiart
Browse files

Fixed potentially nasty bug

parent 4fe1e030
......@@ -54,13 +54,13 @@ static void __ensurecapacity(log_private_t * me)
memcpy(&temp[i], &me->entries[j], sizeof(raft_entry_t));
}
/* clean up old entries */
free(me->entries);
me->size *= 2;
me->entries = temp;
me->front = 0;
me->back = me->count;
/* clean up old entries */
free(me->entries);
}
log_t* log_new()
......
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