Bug #944: Deletion of unnecessary checks before a few calls of systemd functions
The following functions return immediately if a null pointer was passed. * calendar_spec_free * link_address_free * manager_free * sd_bus_unref * sd_journal_close * udev_monitor_unref * udev_unref It is therefore not needed that a function caller repeats a corresponding check. This issue was fixed by using the software Coccinelle 1.0.1.
This commit is contained in:
@@ -355,8 +355,7 @@ int main(int argc, char *argv[]) {
|
||||
log_debug("systemd-machined stopped as pid "PID_FMT, getpid());
|
||||
|
||||
finish:
|
||||
if (m)
|
||||
manager_free(m);
|
||||
manager_free(m);
|
||||
|
||||
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user