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
+2 -5
View File
@@ -135,11 +135,8 @@ static void socket_done(Unit *u) {
unit_ref_unset(&s->service);
free(s->tcp_congestion);
s->tcp_congestion = NULL;
free(s->bind_to_device);
s->bind_to_device = NULL;
s->tcp_congestion = mfree(s->tcp_congestion);
s->bind_to_device = mfree(s->bind_to_device);
free(s->smack);
free(s->smack_ip_in);