Commit 58a41286 authored by oggk's avatar oggk
Browse files

actually clear the packet, not the first sizeof(void*) bytes

parent 6d80afe1
...@@ -390,7 +390,7 @@ static int create_index_packet(int num_allocated_keypoints, ...@@ -390,7 +390,7 @@ static int create_index_packet(int num_allocated_keypoints,
int num_used_keypoints) int num_used_keypoints)
{ {
size_t size = 14 + num_allocated_keypoints * KEYPOINT_SIZE; size_t size = 14 + num_allocated_keypoints * KEYPOINT_SIZE;
memset (op, 0, sizeof(op)); memset (op, 0, sizeof(*op));
op->packet = malloc(size); op->packet = malloc(size);
if (op->packet == NULL) if (op->packet == NULL)
return -1; return -1;
......
Supports Markdown
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