| Summary: | Memory leak in get_proc_cpuinfo | ||
|---|---|---|---|
| Product: | liboil | Reporter: | Sergey Scobich <sergey.scobich> |
| Component: | unknown | Assignee: | David Schleef <ds> |
| Status: | RESOLVED FIXED | QA Contact: | David Schleef <ds> |
| Severity: | normal | ||
| Priority: | highest | ||
| Version: | unspecified | ||
| Hardware: | x86 (IA32) | ||
| OS: | Windows (All) | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
Yeah, it would be smart to not use this function on !linux. Checked in a fix for the leak(s). I'll eventually get to writing better code for CPU detection on different OS's. Right now, I think it works. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Here is the part of code: cpuinfo = malloc(4096); if (cpuinfo == NULL) return NULL; fd = open("/proc/cpuinfo", O_RDONLY); if (fd < 0) return NULL; if open() failed you need to free() cpuinfo. It always failing on Windows platform for example. Is it possible to exclude this function from compilation on Windows platform - you don't need to call it at all?