mirror of
https://github.com/systemd/systemd.git
synced 2025-08-31 09:49:54 +03:00
journald: free the allocated memory before returning from dev_kmsg_record
This fixes a minor memory leak.
This commit is contained in:
@ -191,7 +191,7 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) {
|
|||||||
|
|
||||||
e = memchr(k, '\n', l);
|
e = memchr(k, '\n', l);
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
goto finish;
|
||||||
|
|
||||||
*e = 0;
|
*e = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user