Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:cmcantalupo
hwloc
hwloc-1.7-topo-fix.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File hwloc-1.7-topo-fix.patch of Package hwloc
From 2ea0f3c268034d4496ec5dd34cb4da63481d867b Mon Sep 17 00:00:00 2001 From: "Christopher M. Cantalupo" <christopher.m.cantalupo@intel.com> Date: Thu, 21 Jul 2016 08:27:30 -0500 Subject: [PATCH] Do not allocate zero size buffer. Signed-off-by: Christopher M. Cantalupo <christopher.m.cantalupo@intel.com> --- src/topology.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/topology.c b/src/topology.c index 7f40e15..45b0088 100644 --- a/src/topology.c +++ b/src/topology.c @@ -2215,15 +2215,17 @@ hwloc_build_level_from_list(struct hwloc_obj *first, struct hwloc_obj ***levelp) } nb = i; - /* allocate and fill level */ - *levelp = malloc(nb * sizeof(struct hwloc_obj *)); - obj = first; - i = 0; - while (obj) { - obj->logical_index = i; - (*levelp)[i] = obj; - i++; - obj = obj->next_cousin; + if (nb) { + /* allocate and fill level */ + *levelp = malloc(nb * sizeof(struct hwloc_obj *)); + obj = first; + i = 0; + while (obj) { + obj->logical_index = i; + (*levelp)[i] = obj; + i++; + obj = obj->next_cousin; + } } return nb; -- 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