Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
lvm2.19272
bug-1181319_02-lvmlockctl-ensure-result-value-i...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bug-1181319_02-lvmlockctl-ensure-result-value-is-always-defined.patch of Package lvm2.19272
From d01f27f41135189611d2030ec87ff5714eb259af Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac <zkabelac@redhat.com> Date: Tue, 4 Feb 2020 15:33:36 +0100 Subject: [PATCH] lvmlockctl: ensure result value is always defined Ensure passed pointer gets predefined value (instead of random stack value). --- daemons/lvmlockd/lvmlockctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemons/lvmlockd/lvmlockctl.c b/daemons/lvmlockd/lvmlockctl.c index 0dfc3e662e79..40432b5519d6 100644 --- a/daemons/lvmlockd/lvmlockctl.c +++ b/daemons/lvmlockd/lvmlockctl.c @@ -326,6 +326,8 @@ static int _lvmlockd_result(daemon_reply reply, int *result) { int reply_result; + *result = NO_LOCKD_RESULT; + if (reply.error) { log_error("lvmlockd_result reply error %d", reply.error); return 0; @@ -337,7 +339,7 @@ static int _lvmlockd_result(daemon_reply reply, int *result) } reply_result = daemon_reply_int(reply, "op_result", NO_LOCKD_RESULT); - if (reply_result == -1000) { + if (reply_result == NO_LOCKD_RESULT) { log_error("lvmlockd_result no op_result"); return 0; } -- 1.8.3.1
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