[PATCH 3/8] introduce pSeries_reconfig.[ch]
Nathan Lynch
ntl at pobox.com
Fri Mar 11 12:46:36 EST 2005
> +static int pSeries_reconfig_add_node(const char *path, struct property *proplist)
> +{
> + struct device_node *np;
> + int err = -ENOMEM;
> +
> + np = kcalloc(1, sizeof(*np), GFP_KERNEL);
> + if (!np)
> + goto out_err;
> +
> + np->full_name = kmalloc(strlen(path) + 1, GFP_KERNEL);
> + if (!np->full_name)
> + goto out_err;
> +
...
> +
> +out_err:
> + kfree(np->full_name);
> + kfree(np);
> + return err;
> +}
Bah, potential null pointer dereference in the first kfree, I'll need
to fix that up.
Nathan
More information about the Linuxppc64-dev
mailing list