drivers/note: Fix the mismatch of va_end call
@@ -1195,6 +1195,7 @@ void sched_note_syscall_enter(int nr, int argc, ...)
for (driver = g_note_drivers; *driver; driver++)
{
va_list copy;
+
va_copy(copy, ap);
if (note_syscall_enter(*driver, nr, argc, &copy))
{
@@ -1202,9 +1203,9 @@ void sched_note_syscall_enter(int nr, int argc, ...)
continue;
}
- va_end(copy);
if ((*driver)->ops->add == NULL)
{
+ va_end(copy);
continue;
}
@@ -1231,6 +1232,8 @@ void sched_note_syscall_enter(int nr, int argc, ...)
}
}
+ va_end(copy);
+
/* Add the note to circular buffer */
note_add(*driver, &note, length);
