[Cocci] Question to stackoverflow answer for finding malloc assignment not followed by if NULL test
hlovdal at gmail.com
Tue Nov 17 18:17:28 CET 2009
Julia has already answered my question about how to add missing
NULL tests after malloc
However, the semantic patch fails to correct variables that
are initialized with a call to malloc in the variable declaration statement.
static void test1(void)
char *ptr = malloc(100);
static void test2(void)
ptr = malloc(100);
only test2 is corrected. Is this because of 1) lack of support
in Julia's answer or 2) a bug?
BR Håkon Løvdal
More information about the Cocci