Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
libkdumpfile
Clean-up-format-data-after-a-failed-probe.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File Clean-up-format-data-after-a-failed-probe.patch of Package libkdumpfile
From: Petr Tesarik <petr@tesarici.cz> Date: Mon, 30 Sep 2024 09:30:16 +0200 Subject: Clean up format data after a failed probe References: bsc#1223399 Upstream: merged Git-commit: f191d5a982719ae0c8414af1f3ce87360613ad95 Make sure that format-specific data is cleaned up after a failed probe. Since private data may not be even allocated at that point, the cleanup handlers must check that the pointer is not NULL before dereferencing it. Add this check to devmem and lkcd cleanup handlers. Signed-off-by: Petr Tesarik <ptesarik@suse.com> --- src/kdumpfile/devmem.c | 3 +++ src/kdumpfile/lkcd.c | 3 +++ src/kdumpfile/open.c | 2 ++ 3 files changed, 8 insertions(+) --- a/src/kdumpfile/devmem.c +++ b/src/kdumpfile/devmem.c @@ -434,6 +434,9 @@ devmem_cleanup(struct kdump_shared *shar { struct devmem_priv *dmp = shared->fmtdata; + if (!dmp) + return; + if (dmp->ce) { free(dmp->ce[0].data); free(dmp->ce); --- a/src/kdumpfile/lkcd.c +++ b/src/kdumpfile/lkcd.c @@ -1065,6 +1065,9 @@ lkcd_cleanup(struct kdump_shared *shared { struct lkcd_priv *lkcdp = shared->fmtdata; + if (!lkcdp) + return; + free_level1(lkcdp->pfn_level1, lkcdp->l1_size); mutex_destroy(&lkcdp->pfn_block_mutex); if (lkcdp->cbuf_slot >= 0) --- a/src/kdumpfile/open.c +++ b/src/kdumpfile/open.c @@ -133,6 +133,8 @@ file_fd_post_hook(kdump_ctx_t *ctx, stru ret = ctx->shared->ops->probe(ctx); if (ret == KDUMP_OK) return kdump_open_known(ctx); + if (ctx->shared->ops->cleanup) + ctx->shared->ops->cleanup(ctx->shared); if (ret != KDUMP_NOPROBE) return ret;
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