Bug 57869 - [aes1660,aes2550,aes2660] g_malloc never returns if it cannot allocate memory
Summary: [aes1660,aes2550,aes2660] g_malloc never returns if it cannot allocate memory
Status: RESOLVED FIXED
Alias: None
Product: libfprint
Classification: Unclassified
Component: libfprint (show other bugs)
Version: unspecified
Hardware: All All
: low trivial
Assignee: Vasily Khoruzhick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-04 08:13 UTC by Patrick Marlier
Modified: 2013-07-11 10:27 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
proposed patch (2.28 KB, patch)
2012-12-04 08:13 UTC, Patrick Marlier
Details | Splinter Review
revised patch (2.88 KB, patch)
2012-12-04 08:43 UTC, Patrick Marlier
Details | Splinter Review

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.