On 01/04, Masami Hiramatsu (Google) wrote:
>
> +DEFINE_FREE(argv, char **, argv_free(_T))

This doesn't look right, I think we need

        DEFINE_FREE(argv, char **, if (_T) argv_free(_T))

?

>From the next patch

        @@ -73,24 +73,20 @@ int dyn_event_release(const char *raw_command, 
struct dyn_event_operations *type
                struct dyn_event *pos, *n;
                char *system = NULL, *event, *p;
                int argc, ret = -ENOENT;
        -       char **argv;
        +       char **argv __free(argv) = NULL;
         
                argv = argv_split(GFP_KERNEL, raw_command, &argc);
                if (!argv)
                        return -ENOMEM;

if argv_split() returns NULL, then __free_argv() will call argv_free(NULL) ?

Oleg.


Reply via email to