gcc does not warn about those, because of the _cleanup_ usage.
clang is smarter here.
int reset_terminal_fd(int fd, bool switch_to_text) {
struct termios termios;
- _cleanup_free_ char *utf8 = NULL;
int r = 0;
/* Set terminal to some sane defaults */
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid personality");
if (mode != UNIT_CHECK) {
- _cleanup_free_ char *str = NULL;
-
c->personality = p;
unit_write_drop_in_private_format(u, mode, name, "%s=%s", name, s);
}
static bool arg_root_rw = false;
static int add_cryptsetup(const char *id, const char *what, bool rw, bool require, char **device) {
- _cleanup_free_ char *e = NULL, *n = NULL, *p = NULL, *d = NULL, *to = NULL;
+ _cleanup_free_ char *e = NULL, *n = NULL, *p = NULL, *d = NULL;
_cleanup_fclose_ FILE *f = NULL;
char *ret;
int r;
} mode = MODE_BISECT;
Type type = TYPE_LEGACY;
int i, pair[2] = { -1, -1 };
- _cleanup_free_ char *name = NULL, *bus_name = NULL, *address = NULL, *server_name = NULL;
+ _cleanup_free_ char *address = NULL, *server_name = NULL;
_cleanup_close_ int bus_ref = -1;
const char *unique;
cpu_set_t cpuset;
.mode = VT_AUTO,
};
- _cleanup_free_ char *utf8 = NULL;
int vt, old_fd;
/* We need to get a fresh handle to the virtual terminal,
void *userdata) {
_cleanup_routing_policy_rule_free_ RoutingPolicyRule *n = NULL;
- _cleanup_free_ char *fwmark = NULL;
Network *network = userdata;
int r;
}
static int routing_policy_rule_read_full_file(char *state_file, char **ret) {
- _cleanup_free_ char *s = NULL, *p = NULL;
+ _cleanup_free_ char *s = NULL;
size_t size;
int r;
char **generator_early,
char **generator_late) {
- _cleanup_(rmdir_and_freep) char *t = NULL;
_cleanup_free_ char *x = NULL, *y = NULL, *z = NULL;
const char *prefix;
static void test_read_line(void) {
_cleanup_fclose_ FILE *f = NULL;
- _cleanup_free_ char *line = NULL;
f = fmemopen((void*) buffer, sizeof(buffer), "re");
assert_se(f);