[PATCH 2/2] updated filesystem auditing patches for lspp test kernel
Serge E. Hallyn
serue at us.ibm.com
Mon Apr 10 17:56:26 UTC 2006
Hard to give this a meaningful review - particularly the first patch,
a large part of which seemed to be moving functionality from one file to
another. But slowly reading along, at least this smells like an error:
Quoting Amy Griffis (amy.griffis at hp.com):
> +/* Initialize a watch entry. */
> +static inline struct audit_watch *audit_init_watch(char *path)
> +{
> + struct audit_watch *watch;
> +
> + watch = kzalloc(sizeof(*watch), GFP_KERNEL);
> + if (unlikely(!watch))
> + return ERR_PTR(-ENOMEM);
...
> + watch = audit_init_watch(path);
> + if (unlikely(IS_ERR(watch)))
> + return PTR_ERR(watch);
Ok, but
> + new = audit_init_watch(path);
> + if (unlikely(!new)) {
> + kfree(path);
> + return ERR_PTR(-ENOMEM);
> + }
not ok
-serge
More information about the Linux-audit
mailing list