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:
@@ -1884,11 +1884,8 @@ int bus_wait_for_jobs(BusWaitForJobs *d, bool quiet) {
|
||||
log_debug_errno(q, "Got result %s/%m for job %s", strna(d->result), strna(d->name));
|
||||
}
|
||||
|
||||
free(d->name);
|
||||
d->name = NULL;
|
||||
|
||||
free(d->result);
|
||||
d->result = NULL;
|
||||
d->name = mfree(d->name);
|
||||
d->result = mfree(d->result);
|
||||
}
|
||||
|
||||
return r;
|
||||
|
||||
@@ -232,8 +232,7 @@ static int parse_line(const char* unit,
|
||||
"Unknown section '%s'. Ignoring.", n);
|
||||
|
||||
free(n);
|
||||
free(*section);
|
||||
*section = NULL;
|
||||
*section = mfree(*section);
|
||||
*section_line = 0;
|
||||
*section_ignored = true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user