Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE-12:Update
systemd.578
0008-journald-fix-memory-leak-on-error-path.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0008-journald-fix-memory-leak-on-error-path.patch of Package systemd.578
From 26d8ff04914a5208d029e899682cd314b7714bf0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Mon, 3 Nov 2014 23:10:34 +0100 Subject: [PATCH] journald: fix memory leak on error path --- src/journal/journal-vacuum.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git src/journal/journal-vacuum.c src/journal/journal-vacuum.c index d141fe0..80723c4 100644 --- src/journal/journal-vacuum.c +++ src/journal/journal-vacuum.c @@ -283,7 +283,11 @@ int journal_directory_vacuum( patch_realtime(directory, p, &st, &realtime); - GREEDY_REALLOC(list, n_allocated, n_list + 1); + if (!GREEDY_REALLOC(list, n_allocated, n_list + 1)) { + free(p); + r = -ENOMEM; + goto finish; + } list[n_list].filename = p; list[n_list].usage = 512UL * (uint64_t) st.st_blocks; -- 1.7.9.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor