mirror of
https://salsa.debian.org/ha-team/libqb
synced 2026-02-01 17:50:12 +00:00
Remove unnecessary checks before free()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
9959615598
commit
0171399274
@ -432,9 +432,7 @@ qb_ipcs_connection_unref(struct qb_ipcs_connection *c)
|
||||
c->service->serv_fns.connection_destroyed(c);
|
||||
}
|
||||
c->service->funcs.disconnect(c);
|
||||
if (c->receive_buf) {
|
||||
free(c->receive_buf);
|
||||
}
|
||||
free(c->receive_buf);
|
||||
free(c);
|
||||
}
|
||||
}
|
||||
|
||||
@ -930,11 +930,7 @@ qb_log_ctl(int32_t t, enum qb_log_conf c, int32_t arg)
|
||||
void
|
||||
qb_log_format_set(int32_t t, const char *format)
|
||||
{
|
||||
if (conf[t].format) {
|
||||
free(conf[t].format);
|
||||
conf[t].format = NULL;
|
||||
}
|
||||
|
||||
free(conf[t].format);
|
||||
conf[t].format = strdup(format ? format : "[%p] %b");
|
||||
assert(conf[t].format != NULL);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user