Use FREE_OBJ for VEV
This was actually done with a Coccinelle patch after finding plain free() calls out of tree: $ cat >free_obj.cocci <<EOF @@ expression obj, objp, magic; @@ ( TAKE_OBJ_NOTNULL(obj, objp, magic); | CAST_OBJ_NOTNULL(obj, objp, magic); | CHECK_OBJ_NOTNULL(obj, magic); | CHECK_OBJ_ORNULL(obj, magic); | CHECK_OBJ(obj, magic); ) ... - free(obj); + FREE_OBJ(obj); $ spatch --dir . --in-place --sp-file free_obj.cocci Asking again, could we consider keeping Coccinelle patches around?
Showing
Please register or sign in to comment