Message ID | 20210203165431.792152a4@gandalf.local.home (mailing list archive) |
---|---|
State | Accepted |
Commit | f598001467ecfe965e184b141f0be5cb0095e052 |
Headers | show |
Series | trace-cmd: Fix plist allocation check in trace-msg.c | expand |
diff --git a/lib/trace-cmd/trace-msg.c b/lib/trace-cmd/trace-msg.c index 8d2ed38d..611af2c1 100644 --- a/lib/trace-cmd/trace-msg.c +++ b/lib/trace-cmd/trace-msg.c @@ -981,7 +981,7 @@ static int get_trace_req_protos(char *buf, int length, } plist = calloc(1, sizeof(struct tracecmd_tsync_protos)); - if (plist) + if (!plist) goto error; plist->names = calloc(count + 1, sizeof(char *)); if (!plist->names)