summaryrefslogtreecommitdiffstats
path: root/src/shared/journal-importer.c
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2022-08-10 14:00:53 +0200
committerDavid Tardon <dtardon@redhat.com>2022-09-13 08:13:42 +0200
commitc9958c4fc55a916885defc3f91f4b0834ba891b4 (patch)
treebb0c27eef9b639ba177da87d49de35fbd62d514e /src/shared/journal-importer.c
parenttree-wide: use ASSERT_PTR more (diff)
downloadsystemd-c9958c4fc55a916885defc3f91f4b0834ba891b4.tar.xz
systemd-c9958c4fc55a916885defc3f91f4b0834ba891b4.zip
tree-wide: check parameter before dereferencing
Diffstat (limited to 'src/shared/journal-importer.c')
-rw-r--r--src/shared/journal-importer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c
index 7c355b6c89..66481da267 100644
--- a/src/shared/journal-importer.c
+++ b/src/shared/journal-importer.c
@@ -36,7 +36,7 @@ void journal_importer_cleanup(JournalImporter *imp) {
}
static char* realloc_buffer(JournalImporter *imp, size_t size) {
- char *b, *old = imp->buf;
+ char *b, *old = ASSERT_PTR(imp)->buf;
b = GREEDY_REALLOC(imp->buf, size);
if (!b)