sizeof *data, when data isn't initalized, is that right?

Daniel Hilst Selli <[email protected]> Thu, 22 Jan 2015 16:19:54 -0200
Newsgroups gmane.linux.c-programming
Message-ID <[email protected]>
I came across this code:

         struct mcp23s08_driver_data     *data;
	...
	data = kzalloc(sizeof *data + chips * sizeof(struct mcp23s08),
                         GFP_KERNEL);


Since data wasn't initialized when `sizeof *data' is called, wasn't this a non-initialized pointer dereference?

Cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html