app/system/uorb: fix error, memset() wrong size.
@@ -509,7 +509,7 @@ static void listener_monitor(FAR struct list_node *objlist, int nb_objects,
return;
}
- recv_msgs = malloc(nb_objects * sizeof(int));
+ recv_msgs = calloc(nb_objects, sizeof(int));
if (!recv_msgs)
{
free(fds);
@@ -560,8 +560,6 @@ static void listener_monitor(FAR struct list_node *objlist, int nb_objects,
return;
}
- memset(recv_msgs, 0, sizeof(recv_msgs));
-
/* Loop poll and print recieved messages */
while ((!nb_msgs || nb_recv_msgs < nb_msgs) && !g_should_exit)
