Fix: handle default switch case with -EINVAL in lttng-syscalls
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 30 Nov 2020 19:46:07 +0000 (14:46 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 30 Nov 2020 19:57:49 +0000 (14:57 -0500)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I7768ea3d0da259976548f6b9417350227390b3be

src/lttng-syscalls.c

index 2c40ae1cbcb03a37c89b5256186306b8bd9cb633..6ce669f5cda7f047dfa73c15293175cd7fc29cc1 100644 (file)
@@ -1935,6 +1935,9 @@ int lttng_syscall_filter_enable_event_notifier(
                case LTTNG_SYSCALL_ABI_COMPAT:
                        dispatch_list = &group->event_notifier_compat_syscall_dispatch[syscall_id];
                        break;
+               default:
+                       ret = -EINVAL;
+                       goto end;
                }
                break;
        case LTTNG_SYSCALL_EXIT:
@@ -1945,8 +1948,14 @@ int lttng_syscall_filter_enable_event_notifier(
                case LTTNG_SYSCALL_ABI_COMPAT:
                        dispatch_list = &group->event_notifier_exit_compat_syscall_dispatch[syscall_id];
                        break;
+               default:
+                       ret = -EINVAL;
+                       goto end;
                }
                break;
+       default:
+               ret = -EINVAL;
+               goto end;
        }
 
        hlist_add_head_rcu(&notifier->u.syscall.node, dispatch_list);
This page took 0.027079 seconds and 4 git commands to generate.