• Dridi Boukelmoune's avatar
    Use FREE_OBJ for VEV · 4edaa283
    Dridi Boukelmoune authored
    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?
    4edaa283
vev.c 9.96 KB