Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
libu2f-server.7902
0001-valgrind-shows-memory-errors-around-this-c...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-valgrind-shows-memory-errors-around-this-code-becaus.patch of Package libu2f-server.7902
From 5d74f88b278ca1df6c69d7328be2a8035ca7976c Mon Sep 17 00:00:00 2001 From: Joe Watkins <krakjoe@php.net> Date: Fri, 9 Dec 2016 14:26:51 +0000 Subject: [PATCH] valgrind shows memory errors around this code, because the reference counts of objects are not managed properly --- u2f-server/core.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/u2f-server/core.c b/u2f-server/core.c index c6bfc84..f384fec 100644 --- a/u2f-server/core.c +++ b/u2f-server/core.c @@ -406,10 +406,13 @@ static int registration_challenge_json(const char *challenge, rc = U2FS_OK; done: - json_object_put(json_challenge); - json_object_put(json_version); - json_object_put(json_appid); - json_object_put(json_output); + if (json_output) { + json_object_put(json_output); + } else { + json_object_put(json_challenge); + json_object_put(json_version); + json_object_put(json_appid); + } return rc; } @@ -981,11 +984,14 @@ static int authentication_challenge_json(const char *challenge, rc = U2FS_OK; done: - json_object_put(json_challenge); - json_object_put(json_key); - json_object_put(json_version); - json_object_put(json_appid); - json_object_put(json_output); + if (json_output) { + json_object_put(json_output); + } else { + json_object_put(json_challenge); + json_object_put(json_key); + json_object_put(json_version); + json_object_put(json_appid); + } return rc; } -- 2.16.4
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