tree-wide: Initialize _cleanup_ variables if needed
This commit is contained in:
@@ -317,7 +317,7 @@ static void* client1(void *p) {
|
||||
|
||||
finish:
|
||||
if (bus) {
|
||||
_cleanup_(sd_bus_message_unrefp) sd_bus_message *q;
|
||||
_cleanup_(sd_bus_message_unrefp) sd_bus_message *q = NULL;
|
||||
|
||||
r = sd_bus_message_new_method_call(
|
||||
bus,
|
||||
@@ -485,7 +485,7 @@ static void* client2(void *p) {
|
||||
|
||||
finish:
|
||||
if (bus) {
|
||||
_cleanup_(sd_bus_message_unrefp) sd_bus_message *q;
|
||||
_cleanup_(sd_bus_message_unrefp) sd_bus_message *q = NULL;
|
||||
|
||||
r = sd_bus_message_new_method_call(
|
||||
bus,
|
||||
|
||||
@@ -128,7 +128,7 @@ static void test_address_get(sd_netlink *rtnl, int ifindex) {
|
||||
}
|
||||
|
||||
static void test_route(sd_netlink *rtnl) {
|
||||
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req;
|
||||
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
|
||||
struct in_addr addr, addr_data;
|
||||
uint32_t index = 2, u32_data;
|
||||
int r;
|
||||
|
||||
@@ -828,7 +828,7 @@ int config_parse_macsec_key_id(
|
||||
|
||||
_cleanup_(macsec_transmit_association_free_or_set_invalidp) TransmitAssociation *a = NULL;
|
||||
_cleanup_(macsec_receive_association_free_or_set_invalidp) ReceiveAssociation *b = NULL;
|
||||
_cleanup_free_ void *p;
|
||||
_cleanup_free_ void *p = NULL;
|
||||
MACsec *s = userdata;
|
||||
uint8_t *dest;
|
||||
size_t l;
|
||||
|
||||
@@ -28,7 +28,7 @@ static ssize_t dnstls_stream_writev(gnutls_transport_ptr_t p, const giovec_t *io
|
||||
}
|
||||
|
||||
int dnstls_stream_connect_tls(DnsStream *stream, DnsServer *server) {
|
||||
_cleanup_(gnutls_deinitp) gnutls_session_t gs;
|
||||
_cleanup_(gnutls_deinitp) gnutls_session_t gs = NULL;
|
||||
int r;
|
||||
|
||||
assert(stream);
|
||||
|
||||
@@ -1743,7 +1743,7 @@ int seccomp_restrict_archs(Set *archs) {
|
||||
}
|
||||
|
||||
int parse_syscall_archs(char **l, Set **archs) {
|
||||
_cleanup_set_free_ Set *_archs;
|
||||
_cleanup_set_free_ Set *_archs = NULL;
|
||||
char **s;
|
||||
int r;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ static void do_fstab_filter_options(const char *opts,
|
||||
|
||||
int r;
|
||||
const char *name;
|
||||
_cleanup_free_ char *value, *filtered;
|
||||
_cleanup_free_ char *value = NULL, *filtered = NULL;
|
||||
|
||||
r = fstab_filter_options(opts, remove, &name, &value, &filtered);
|
||||
log_info("\"%s\" → %d, \"%s\", \"%s\", \"%s\", expected %d, \"%s\", \"%s\", \"%s\"",
|
||||
|
||||
@@ -207,7 +207,7 @@ static int link_unsigned_attribute(sd_device *device, const char *attr, unsigned
|
||||
}
|
||||
|
||||
int link_config_load(link_config_ctx *ctx) {
|
||||
_cleanup_strv_free_ char **files;
|
||||
_cleanup_strv_free_ char **files = NULL;
|
||||
char **f;
|
||||
int r;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user