The parenthesis were missing to make the malloc math have the correct
precedence. The addition needs to occur before the multiplication.
The result is the same but for clarity also change change char ** to
char * because we are allocating an array of char pointers.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
case DESTROY_TRACE:
case ENABLE_MARKER:
case DISABLE_MARKER:
- args = (char **)malloc(sizeof(char **) * argc + 3);
+ args = (char **)malloc(sizeof(char *) * (argc + 3));
optind--;
args[optind] = strdup(&argv[optind][2]);
for (i = optind + 1; i < argc; i++) {