envp[n_env++] = k;
} else {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
const char *n;
p = strjoin(*s, "=");
break;
case ARG_FDNAME: {
- _cleanup_strv_free_ char **names;
+ _cleanup_strv_free_ char **names = NULL;
char **s;
names = strv_split(optarg, ":");
STRV_FOREACH(s, names)
if (!fdname_is_valid(*s)) {
- _cleanup_free_ char *esc;
+ _cleanup_free_ char *esc = NULL;
esc = cescape(*s);
log_warning("File descriptor name \"%s\" is not valid.", esc);
* (NB: For testing purposes, we still check the $SYSTEMD_EFI_OPTIONS env var before accessing this
* cache, even when in SecureBoot mode.) */
if (is_efi_secure_boot()) {
- _cleanup_free_ char *k;
+ _cleanup_free_ char *k = NULL;
k = efi_variable_path(EFI_VENDOR_SYSTEMD, "SystemdOptions");
if (!k)
log_debug("Ignoring unit files.");
p->search_path = strv_free(p->search_path);
} else {
- _cleanup_free_ char *t;
+ _cleanup_free_ char *t = NULL;
t = strv_join(p->search_path, "\n\t");
log_debug("Looking for unit files in (higher priority first):\n\t%s", strna(t));
static volatile int cached_underline_enabled = -1;
int chvt(int vt) {
- _cleanup_close_ int fd;
+ _cleanup_close_ int fd = -1;
/* Switch to the specified vt number. If the VT is specified <= 0 switch to the VT the kernel log messages go,
* if that's configured. */
}
int terminal_vhangup(const char *name) {
- _cleanup_close_ int fd;
+ _cleanup_close_ int fd = -1;
fd = open_terminal(name, O_RDWR|O_NOCTTY|O_CLOEXEC|O_NONBLOCK);
if (fd < 0)
.it_value.tv_sec = TIME_T_MAX,
};
- _cleanup_close_ int fd;
+ _cleanup_close_ int fd = -1;
assert_cc(sizeof(time_t) == sizeof(TIME_T_MAX));
strv_free_and_replace(arg_path, a);
if (DEBUG_LOGGING) {
- _cleanup_free_ char *j;
+ _cleanup_free_ char *j = NULL;
j = strv_join(arg_path, ":");
log_debug("Using %s as boot loader drop-in search path.", j);
}
static int boot_entry_file_check(const char *root, const char *p) {
- _cleanup_free_ char *path;
+ _cleanup_free_ char *path = NULL;
path = path_join(root, p);
if (!path)
device_path = DevicePathFromHandle(entry->device);
if (device_path) {
- _cleanup_freepool_ CHAR16 *str;
+ _cleanup_freepool_ CHAR16 *str = NULL;
str = DevicePathToStr(device_path);
Print(L"device handle '%s'\n", str);
* is non-NULL explicitly.) */
if (efivar_get_raw(LOADER_GUID, L"LoaderImageIdentifier", NULL, NULL) != EFI_SUCCESS &&
loaded_image->FilePath) {
- _cleanup_freepool_ CHAR16 *s;
+ _cleanup_freepool_ CHAR16 *s = NULL;
s = DevicePathToStr(loaded_image->FilePath);
efivar_set(LOADER_GUID, L"LoaderImageIdentifier", s, 0);
/* if LoaderFirmwareInfo is not set, let's set it */
if (efivar_get_raw(LOADER_GUID, L"LoaderFirmwareInfo", NULL, NULL) != EFI_SUCCESS) {
- _cleanup_freepool_ CHAR16 *s;
+ _cleanup_freepool_ CHAR16 *s = NULL;
s = PoolPrint(L"%s %d.%02d", ST->FirmwareVendor, ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0xffff);
efivar_set(LOADER_GUID, L"LoaderFirmwareInfo", s, 0);
/* ditto for LoaderFirmwareType */
if (efivar_get_raw(LOADER_GUID, L"LoaderFirmwareType", NULL, NULL) != EFI_SUCCESS) {
- _cleanup_freepool_ CHAR16 *s;
+ _cleanup_freepool_ CHAR16 *s = NULL;
s = PoolPrint(L"UEFI %d.%02d", ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0xffff);
efivar_set(LOADER_GUID, L"LoaderFirmwareType", s, 0);
return err;
if (size == 0) {
- _cleanup_freepool_ EFI_FILE_INFO *info;
+ _cleanup_freepool_ EFI_FILE_INFO *info = NULL;
info = LibFileInfo(handle);
if (!info)
DEFINE_TRIVIAL_CLEANUP_FUNC(Set*, member_set_free);
static int on_interface(const char *interface, uint64_t flags, void *userdata) {
- _cleanup_(member_freep) Member *m;
+ _cleanup_(member_freep) Member *m = NULL;
Set *members = userdata;
int r;
}
static int on_method(const char *interface, const char *name, const char *signature, const char *result, uint64_t flags, void *userdata) {
- _cleanup_(member_freep) Member *m;
+ _cleanup_(member_freep) Member *m = NULL;
Set *members = userdata;
int r;
}
static int on_signal(const char *interface, const char *name, const char *signature, uint64_t flags, void *userdata) {
- _cleanup_(member_freep) Member *m;
+ _cleanup_(member_freep) Member *m = NULL;
Set *members = userdata;
int r;
}
static int on_property(const char *interface, const char *name, const char *signature, bool writable, uint64_t flags, void *userdata) {
- _cleanup_(member_freep) Member *m;
+ _cleanup_(member_freep) Member *m = NULL;
Set *members = userdata;
int r;
unit_write_settingf(u, flags, name, "RootHash=");
} else {
- _cleanup_free_ void *p;
+ _cleanup_free_ void *p = NULL;
encoded = hexmem(roothash_decoded, roothash_decoded_size);
if (!encoded)
unit_write_settingf(u, flags, name, "RootHashSignature=");
} else {
- _cleanup_free_ void *p;
+ _cleanup_free_ void *p = NULL;
ssize_t len;
len = base64mem(roothash_sig_decoded, roothash_sig_decoded_size, &encoded);
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Path in %s is not absolute: %s", type_name, path);
if (!UNIT_WRITE_FLAGS_NOOP(flags)) {
- _cleanup_free_ char *k;
+ _cleanup_free_ char *k = NULL;
PathSpec *s;
k = strdup(path);
final_argv = command->argv;
if (DEBUG_LOGGING) {
- _cleanup_free_ char *line;
+ _cleanup_free_ char *line = NULL;
line = exec_command_line(final_argv);
if (line)
return 0;
STRV_FOREACH(i, c->directories[EXEC_DIRECTORY_RUNTIME].paths) {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
if (exec_directory_is_private(c, EXEC_DIRECTORY_RUNTIME))
p = path_join(runtime_prefix, "private", *i);
REENABLE_WARNING;
if (t == JOB_START && result == JOB_FAILED) {
- _cleanup_free_ char *quoted;
+ _cleanup_free_ char *quoted = NULL;
quoted = shell_maybe_quote(u->id, ESCAPE_BACKSLASH);
manager_status_printf(u->manager, STATUS_TYPE_NORMAL, NULL, "See 'systemctl status %s' for details.", strna(quoted));
}
} else {
if (DEBUG_LOGGING) {
- _cleanup_free_ char *t;
+ _cleanup_free_ char *t = NULL;
t = uid_to_name(getuid());
log_debug("systemd " GIT_VERSION " running in %suser mode for user " UID_FMT "/%s. (%s)",
}
static int have_ask_password(void) {
- _cleanup_closedir_ DIR *dir;
+ _cleanup_closedir_ DIR *dir = NULL;
struct dirent *de;
dir = opendir("/run/systemd/ask-password");
}
if (log_namespace) {
- _cleanup_free_ char *q;
+ _cleanup_free_ char *q = NULL;
q = strjoin("/run/systemd/journal.", log_namespace);
if (!q) {
}
LIST_FOREACH(mount_options, i, item->mount_options) {
- _cleanup_(mount_options_free_allp) MountOptions *o;
+ _cleanup_(mount_options_free_allp) MountOptions *o = NULL;
o = new(MountOptions, 1);
if (!o)
if (getpeername_pretty(fd, true, &peer) >= 0) {
if (UNIT(s)->description) {
- _cleanup_free_ char *a;
+ _cleanup_free_ char *a = NULL;
a = strjoin(UNIT(s)->description, " (", peer, ")");
if (!a)
assert(u);
for (;;) {
- _cleanup_free_ char *path;
+ _cleanup_free_ char *path = NULL;
path = hashmap_steal_first_key(u->requires_mounts_for);
if (!path)
char **dp;
STRV_FOREACH(dp, c->directories[dt].paths) {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
p = path_join(u->manager->prefix[dt], *dp);
if (!p)
if (n_message_parts == 0)
t = strjoina("MESSAGE=", u->id, ": Completed.");
else {
- _cleanup_free_ char *joined;
+ _cleanup_free_ char *joined = NULL;
message_parts[n_message_parts] = NULL;
static int get_process_ns(pid_t pid, const char *namespace, ino_t *ns) {
const char *p;
struct stat stbuf;
- _cleanup_close_ int proc_ns_dir_fd;
+ _cleanup_close_ int proc_ns_dir_fd = -1;
p = procfs_file_alloca(pid, "ns");
return r;
if (DEBUG_LOGGING) {
- _cleanup_free_ char *filter;
+ _cleanup_free_ char *filter = NULL;
filter = journal_make_match_string(j);
log_debug("Journal filter: %s", filter);
if (filename) {
#if HAVE_COMPRESSION
- _cleanup_close_ int fdf;
+ _cleanup_close_ int fdf = -1;
fdf = open(filename, O_RDONLY | O_CLOEXEC);
if (fdf < 0) {
}
STRV_FOREACH(i, search_path) {
- _cleanup_free_ char *joined;
+ _cleanup_free_ char *joined = NULL;
joined = path_join(*i, key_file);
if (!joined)
return r;
if (DEBUG_LOGGING) {
- _cleanup_free_ char *t;
+ _cleanup_free_ char *t = NULL;
t = strv_join(dirs, "\n\t");
log_debug("Looking for environment.d files in (higher priority first):\n\t%s", strna(t));
return r;
if (!isempty(fstype) && !streq(fstype, "auto")) {
- _cleanup_free_ char *t;
+ _cleanup_free_ char *t = NULL;
t = specifier_escape(fstype);
if (!t)
colon2 = strchr(colon + 1, ':');
if (colon2) {
- _cleanup_free_ char *t;
+ _cleanup_free_ char *t = NULL;
t = strndup(colon + 1, colon2 - colon - 1);
if (!t)
break;
case JOURNAL_WRITE_SPLIT_HOST: {
- _cleanup_free_ char *name;
+ _cleanup_free_ char *name = NULL;
assert(host);
if (S_ISREG(st.st_mode) && (0111 & st.st_mode)) {
if (executable_is_script(p, &interpreter) > 0) {
- _cleanup_free_ char *comm;
+ _cleanup_free_ char *comm = NULL;
comm = strndup(basename(p), 15);
if (!comm)
char **patterns,
Set **units) {
- _cleanup_set_free_free_ Set *found;
+ _cleanup_set_free_free_ Set *found = NULL;
const char *field;
int r;
case ACTION_LIST_CATALOG:
case ACTION_DUMP_CATALOG:
case ACTION_UPDATE_CATALOG: {
- _cleanup_free_ char *database;
+ _cleanup_free_ char *database = NULL;
database = path_join(arg_root, CATALOG_DATABASE);
if (!database) {
goto finish;
if (DEBUG_LOGGING) {
- _cleanup_free_ char *filter;
+ _cleanup_free_ char *filter = NULL;
filter = journal_make_match_string(j);
if (!filter)
s->id_field + STRLEN("_STREAM_ID="));
if (!isempty(s->identifier)) {
- _cleanup_free_ char *escaped;
+ _cleanup_free_ char *escaped = NULL;
escaped = cescape(s->identifier);
if (!escaped) {
}
if (!isempty(s->unit_id)) {
- _cleanup_free_ char *escaped;
+ _cleanup_free_ char *escaped = NULL;
escaped = cescape(s->unit_id);
if (!escaped) {
}
static void fuzz_client(const uint8_t *data, size_t size, bool is_information_request_enabled) {
- _cleanup_(sd_event_unrefp) sd_event *e;
+ _cleanup_(sd_event_unrefp) sd_event *e = NULL;
_cleanup_(sd_dhcp6_client_unrefp) sd_dhcp6_client *client = NULL;
struct in6_addr address = { { { 0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01 } } };
}
static int journal_file_empty(int dir_fd, const char *name) {
- _cleanup_close_ int fd;
+ _cleanup_close_ int fd = -1;
struct stat st;
le64_t n_entries;
ssize_t n;
* treat them as fatal. */
ORDERED_HASHMAP_FOREACH(f, j->files) {
- _cleanup_free_ char *dir;
+ _cleanup_free_ char *dir = NULL;
int r;
dir = dirname_malloc(f->path);
}
_public_ int sd_get_uids(uid_t **users) {
- _cleanup_closedir_ DIR *d;
+ _cleanup_closedir_ DIR *d = NULL;
struct dirent *de;
int r = 0;
unsigned n = 0;
int find_converted_keymap(const char *x11_layout, const char *x11_variant, char **new_keymap) {
const char *dir;
- _cleanup_free_ char *n;
+ _cleanup_free_ char *n = NULL;
if (x11_variant)
n = strjoin(x11_layout, "-", x11_variant);
(void) locale_update_system_manager(c, sd_bus_message_get_bus(m));
if (settings) {
- _cleanup_free_ char *line;
+ _cleanup_free_ char *line = NULL;
line = strv_join(settings, ", ");
log_info("Changed locale to %s.", strnull(line));
static int vt_is_busy(unsigned vtnr) {
struct vt_stat vt_stat;
int r;
- _cleanup_close_ int fd;
+ _cleanup_close_ int fd = -1;
assert(vtnr >= 1);
}
static int flush_devices(Manager *m) {
- _cleanup_closedir_ DIR *d;
+ _cleanup_closedir_ DIR *d = NULL;
assert(m);
m->scheduled_shutdown_type);
if (!isempty(m->wall_message)) {
- _cleanup_free_ char *t;
+ _cleanup_free_ char *t = NULL;
t = cescape(m->wall_message);
if (!t) {
fprintf(f, "DISPLAY=%s\n", s->display);
if (s->remote_host) {
- _cleanup_free_ char *escaped;
+ _cleanup_free_ char *escaped = NULL;
escaped = cescape(s->remote_host);
if (!escaped) {
}
if (s->remote_user) {
- _cleanup_free_ char *escaped;
+ _cleanup_free_ char *escaped = NULL;
escaped = cescape(s->remote_user);
if (!escaped) {
}
if (s->service) {
- _cleanup_free_ char *escaped;
+ _cleanup_free_ char *escaped = NULL;
escaped = cescape(s->service);
if (!escaped) {
}
if (s->desktop) {
- _cleanup_free_ char *escaped;
+ _cleanup_free_ char *escaped = NULL;
escaped = cescape(s->desktop);
if (!escaped) {
m->name);
if (m->unit) {
- _cleanup_free_ char *escaped;
+ _cleanup_free_ char *escaped = NULL;
escaped = cescape(m->unit);
if (!escaped) {
fprintf(f, "SCOPE_JOB=%s\n", m->scope_job);
if (m->service) {
- _cleanup_free_ char *escaped;
+ _cleanup_free_ char *escaped = NULL;
escaped = cescape(m->service);
if (!escaped) {
}
if (m->root_directory) {
- _cleanup_free_ char *escaped;
+ _cleanup_free_ char *escaped = NULL;
escaped = cescape(m->root_directory);
if (!escaped) {
}
static int netdev_tuntap_add(NetDev *netdev, struct ifreq *ifr) {
- _cleanup_close_ int fd;
+ _cleanup_close_ int fd = -1;
TunTap *t = NULL;
const char *user;
const char *group;
static int parse_interface_with_operstate_range(const char *str) {
_cleanup_free_ char *ifname = NULL;
- _cleanup_free_ LinkOperationalStateRange *range;
+ _cleanup_free_ LinkOperationalStateRange *range = NULL;
const char *p;
int r;
assert_se(dot = strrchr(unit, '.'));
NULSTR_FOREACH(p, profile_dirs) {
- _cleanup_free_ char *joined;
+ _cleanup_free_ char *joined = NULL;
joined = strjoin(p, "/", name, "/", dot + 1, ".conf");
if (!joined)
nl = true;
} else {
_cleanup_free_ char *pretty_portable = NULL, *pretty_os = NULL;
- _cleanup_fclose_ FILE *f;
+ _cleanup_fclose_ FILE *f = NULL;
f = fmemopen_unlocked((void*) data, sz, "re");
if (!f)
/* Since all the active services are in the zone make them discoverable now. */
SET_FOREACH(service_type, types) {
- _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *rr;
+ _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *rr = NULL;
rr = dns_resource_record_new_full(DNS_CLASS_IN, DNS_TYPE_PTR,
"_services._dns-sd._udp.local");
int parse_acl(const char *text, acl_t *acl_access, acl_t *acl_default, bool want_mask) {
_cleanup_free_ char **a = NULL, **d = NULL; /* strings are not freed */
- _cleanup_strv_free_ char **split;
+ _cleanup_strv_free_ char **split = NULL;
char **entry;
int r = -EINVAL;
_cleanup_(acl_freep) acl_t a_acl = NULL, d_acl = NULL;
}
if (!strv_isempty(a)) {
- _cleanup_free_ char *join;
+ _cleanup_free_ char *join = NULL;
join = strv_join(a, ",");
if (!join)
}
if (!strv_isempty(d)) {
- _cleanup_free_ char *join;
+ _cleanup_free_ char *join = NULL;
join = strv_join(d, ",");
if (!join)
service_shell_quoted = shell_maybe_quote(service, ESCAPE_BACKSLASH);
if (!strv_isempty((char**) extra_args)) {
- _cleanup_free_ char *t;
+ _cleanup_free_ char *t = NULL;
t = strv_join((char**) extra_args, " ");
systemctl = strjoina("systemctl ", t ? : "<args>");
}
if (S_ISDIR(st.st_mode)) {
- _cleanup_closedir_ DIR *kid;
+ _cleanup_closedir_ DIR *kid = NULL;
kid = xopendirat(dirfd(dir), de->d_name, O_NOFOLLOW|O_NOATIME);
if (!kid) {
}
int clock_is_localtime(const char* adjtime_path) {
- _cleanup_fclose_ FILE *f;
+ _cleanup_fclose_ FILE *f = NULL;
int r;
if (!adjtime_path)
case TABLE_TIMESTAMP:
case TABLE_TIMESTAMP_UTC:
case TABLE_TIMESTAMP_RELATIVE: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
char *ret;
p = new(char, FORMAT_TIMESTAMP_MAX);
case TABLE_TIMESPAN:
case TABLE_TIMESPAN_MSEC: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
p = new(char, FORMAT_TIMESPAN_MAX);
if (!p)
}
case TABLE_SIZE: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
p = new(char, FORMAT_BYTES_MAX);
if (!p)
}
case TABLE_BPS: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
size_t n;
p = new(char, FORMAT_BYTES_MAX+2);
}
case TABLE_INT: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
p = new(char, DECIMAL_STR_WIDTH(d->int_val) + 1);
if (!p)
}
case TABLE_INT8: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
p = new(char, DECIMAL_STR_WIDTH(d->int8) + 1);
if (!p)
}
case TABLE_INT16: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
p = new(char, DECIMAL_STR_WIDTH(d->int16) + 1);
if (!p)
}
case TABLE_INT32: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
p = new(char, DECIMAL_STR_WIDTH(d->int32) + 1);
if (!p)
}
case TABLE_INT64: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
p = new(char, DECIMAL_STR_WIDTH(d->int64) + 1);
if (!p)
}
case TABLE_UINT: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
p = new(char, DECIMAL_STR_WIDTH(d->uint_val) + 1);
if (!p)
}
case TABLE_UINT8: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
p = new(char, DECIMAL_STR_WIDTH(d->uint8) + 1);
if (!p)
}
case TABLE_UINT16: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
p = new(char, DECIMAL_STR_WIDTH(d->uint16) + 1);
if (!p)
}
case TABLE_UINT32: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
p = new(char, DECIMAL_STR_WIDTH(d->uint32) + 1);
if (!p)
}
case TABLE_UINT64: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
p = new(char, DECIMAL_STR_WIDTH(d->uint64) + 1);
if (!p)
}
case TABLE_PERCENT: {
- _cleanup_free_ char *p;
+ _cleanup_free_ char *p = NULL;
p = new(char, DECIMAL_STR_WIDTH(d->percent) + 2);
if (!p)
return r;
STRV_FOREACH(p, files) {
- _cleanup_fclose_ FILE *f;
+ _cleanup_fclose_ FILE *f = NULL;
int n = 0;
f = fopen(*p, "re");
continuation * prefix, "",
color_on, len, pos, color_off);
else {
- _cleanup_free_ char *e;
+ _cleanup_free_ char *e = NULL;
e = ellipsize_mem(pos, len, n_columns - prefix,
tail_line ? 100 : 90);
return r;
if (DEBUG_LOGGING) {
- _cleanup_free_ char *filter;
+ _cleanup_free_ char *filter = NULL;
filter = journal_make_match_string(j);
if (!filter)
const char *ssid,
const struct ether_addr *bssid) {
- _cleanup_free_ char *iftype_str;
+ _cleanup_free_ char *iftype_str = NULL;
const char *path = NULL;
assert(match);
#include "time-util.h"
int parse_sleep_config(SleepConfig **ret_sleep_config) {
- _cleanup_(free_sleep_configp) SleepConfig *sc;
+ _cleanup_(free_sleep_configp) SleepConfig *sc = NULL;
int allow_suspend = -1, allow_hibernate = -1,
allow_s2h = -1, allow_hybrid_sleep = -1;
/* Removing empty dropin dirs */
if (!arg_full) {
- _cleanup_free_ char *dir;
+ _cleanup_free_ char *dir = NULL;
dir = dirname_malloc(*original);
if (!dir)
char ***ret_machines) {
_cleanup_free_ UnitInfo *unit_infos = NULL;
- _cleanup_(message_set_freep) Set *replies;
+ _cleanup_(message_set_freep) Set *replies = NULL;
sd_bus_message *reply;
int c, r;
while ((r = exec_status_info_deserialize(m, &info, is_ex_prop)) > 0) {
char timestamp1[FORMAT_TIMESTAMP_MAX], timestamp2[FORMAT_TIMESTAMP_MAX];
_cleanup_strv_free_ char **optv = NULL;
- _cleanup_free_ char *tt, *o = NULL;
+ _cleanup_free_ char *tt = NULL, *o = NULL;
tt = strv_join(info.argv, " ");
return r;
STRV_FOREACH(name, names) {
- _cleanup_free_ char *path;
+ _cleanup_free_ char *path = NULL;
path = unit_dbus_path_from_name(*name);
if (!path)
path_escaped);
if (s->description) {
- _cleanup_free_ char *t;
+ _cleanup_free_ char *t = NULL;
t = specifier_escape(s->description);
if (!t)
yes_no(!s->pid_file));
if (s->pid_file) {
- _cleanup_free_ char *t;
+ _cleanup_free_ char *t = NULL;
t = specifier_escape(s->pid_file);
if (!t)
}
static int load_sysv(SysvStub *s) {
- _cleanup_fclose_ FILE *f;
+ _cleanup_fclose_ FILE *f = NULL;
unsigned line = 0;
int r;
enum {
}
static int run(int argc, char * argv[]) {
- _cleanup_(sd_event_unrefp) sd_event *event;
+ _cleanup_(sd_event_unrefp) sd_event *event = NULL;
_cleanup_(clock_state_release) ClockState state = {
.timerfd_fd = -1,
.inotify_fd = -1,
}
static int process_password_files(void) {
- _cleanup_closedir_ DIR *d;
+ _cleanup_closedir_ DIR *d = NULL;
struct dirent *de;
int r = 0;
int *argc, char ***newargv) {
_cleanup_free_ char *vendor_in = NULL, *model_in = NULL, *options_in = NULL; /* read in from file */
_cleanup_strv_free_ char **options_argv = NULL;
- _cleanup_fclose_ FILE *f;
+ _cleanup_fclose_ FILE *f = NULL;
int lineno, r;
f = fopen(config_file, "re");
args[i++] = NULL;
if (DEBUG_LOGGING) {
- _cleanup_free_ char *cmd;
+ _cleanup_free_ char *cmd = NULL;
cmd = strv_join((char**) args, " ");
log_debug("Executing \"%s\"...", strnull(cmd));
args[i++] = NULL;
if (DEBUG_LOGGING) {
- _cleanup_free_ char *cmd;
+ _cleanup_free_ char *cmd = NULL;
cmd = strv_join((char**) args, " ");
log_debug("Executing \"%s\"...", strnull(cmd));