On Tue, Jan 13, 2009 at 02:38:57PM +0100, Johannes Berg wrote: > kmemdup? Might also make sense to not try the allocation if we're going > to refuse it anyway, but that might be complicated to do and probably > doesn't matter. I did not know there is such a thing as kmemdup (apparently not that many other people, either, taken into account it is not used anywhere in the generic wireless code). Anyway, yes, it would work here. Moving the allocation to be done for each subtype separately would add quite a bit of extra code and error paths. Doing it once resulted in simpler implementation. The array version was much simpler on this area, but with separate variables for each subtype, I think it is better to just allocate (and deal with NULL) once even if we will immediately after this need to free the buffer in the case the request is going to be refused. -- Jouni Malinen PGP id EFC895FA -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html