From: Zbigniew Jędrzejewski-Szmek Date: Thu, 4 Jan 2018 10:19:55 +0000 (+0100) Subject: core: double free in bus_timer_set_transient_property X-Git-Tag: v237~152^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1330648562c6924f846b869cc40125776fcd4e04;p=thirdparty%2Fsystemd.git core: double free in bus_timer_set_transient_property Introduced in 3e3c5a4571d. CID #1384233. --- diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c index 900ed369ddd..1eedf217fe2 100644 --- a/src/core/dbus-timer.c +++ b/src/core/dbus-timer.c @@ -373,10 +373,8 @@ static int bus_timer_set_transient_property( unit_write_settingf(u, flags|UNIT_ESCAPE_SPECIFIERS, name, "%s=%s", name, str); v = new0(TimerValue, 1); - if (!v) { - calendar_spec_free(c); + if (!v) return -ENOMEM; - } v->base = TIMER_CALENDAR; v->calendar_spec = c;