tree-wide: use coccinelle to patch a lot of code to use mfree()

This replaces this:

        free(p);
        p = NULL;

by this:

        p = mfree(p);

Change generated using coccinelle. Semantic patch is added to the
sources.
This commit is contained in:
Lennart Poettering
2015-09-09 08:19:27 +02:00
parent da323858ef
commit a1e58e8ee1
42 changed files with 86 additions and 173 deletions
+1 -2
View File
@@ -145,8 +145,7 @@ bool bitmap_isclear(Bitmap *b) {
void bitmap_clear(Bitmap *b) {
assert(b);
free(b->bitmaps);
b->bitmaps = NULL;
b->bitmaps = mfree(b->bitmaps);
b->n_bitmaps = 0;
b->bitmaps_allocated = 0;
}