Bug 57869

Summary: [aes1660,aes2550,aes2660] g_malloc never returns if it cannot allocate memory
Product: libfprint Reporter: Patrick Marlier <patrick.marlier>
Component: libfprintAssignee: Vasily Khoruzhick <anarsoul>
Status: RESOLVED FIXED QA Contact:
Severity: trivial    
Priority: low CC: anarsoul
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: proposed patch
revised patch

Description Patrick Marlier 2012-12-04 08:13:32 UTC
Created attachment 70986 [details] [review]
proposed patch
Comment 1 Bastien Nocera 2012-12-04 08:24:46 UTC
Comment on attachment 70986 [details] [review]
proposed patch

Review of attachment 70986 [details] [review]:
-----------------------------------------------------------------

There's another case in libfprint/drivers/aesx660.c

Separate cleanups that would be good:
- use g_new/g_new0 instead of size(bleh) * count
- verify that g_free() is always the one called for g_malloc() (and related) calls
- Investigate use of g_slice_* functions for some oft-allocated/freed resources
Comment 2 Vasily Khoruzhick 2012-12-04 08:28:31 UTC
(In reply to comment #1)
> Comment on attachment 70986 [details] [review] [review]
> proposed patch
> 
> Review of attachment 70986 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> There's another case in libfprint/drivers/aesx660.c
> 
> Separate cleanups that would be good:
> - use g_new/g_new0 instead of size(bleh) * count
> - verify that g_free() is always the one called for g_malloc() (and related)
> calls
> - Investigate use of g_slice_* functions for some oft-allocated/freed
> resources

Sure. Proposed patch looks OK.
Comment 3 Patrick Marlier 2012-12-04 08:43:41 UTC
Created attachment 70988 [details] [review]
revised patch
Comment 4 Bastien Nocera 2013-06-26 12:23:18 UTC
Comment on attachment 70988 [details] [review]
revised patch

Patch pushed.

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.