diff --git a/lib/ipcs.c b/lib/ipcs.c index abffa9c..70d4382 100644 --- a/lib/ipcs.c +++ b/lib/ipcs.c @@ -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); } } diff --git a/lib/log.c b/lib/log.c index bd1c5c7..6c0509f 100644 --- a/lib/log.c +++ b/lib/log.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); }