mirror of
https://github.com/systemd/systemd.git
synced 2025-01-23 02:04:32 +03:00
bus: fix memleak in sd_bus_creds_new_from_pid
This commit is contained in:
parent
5ce70e5bcd
commit
0349c608c8
@ -140,7 +140,7 @@ _public_ int sd_bus_creds_new_from_pid(pid_t pid, uint64_t mask, sd_bus_creds **
|
|||||||
|
|
||||||
r = bus_creds_add_more(c, mask, pid, 0);
|
r = bus_creds_add_more(c, mask, pid, 0);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
free(c);
|
sd_bus_creds_unref(c);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user