sd-event: fix theoretical leak on error in event_make_signal_data

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2016-01-18 15:21:28 -05:00
parent c952944ef8
commit 90f604d128
+3 -1
View File
@@ -661,8 +661,10 @@ static int event_make_signal_data(
d->priority = priority;
r = hashmap_put(e->signal_data, &d->priority, d);
if (r < 0)
if (r < 0) {
free(d);
return r;
}
added = true;
}